chore: use monorepo organization
This commit is contained in:
parent
deaf7d6ecc
commit
a687827f7e
1099 changed files with 8184 additions and 11535 deletions
21
packages/server/lib/environment-helper.js
Normal file
21
packages/server/lib/environment-helper.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
const path = require('path')
|
||||
|
||||
const isDevMode = () => process.env.NODE_ENV === 'development'
|
||||
const isProdMode = () => process.env.NODE_ENV === 'production'
|
||||
|
||||
require('dotenv').config({ path: path.resolve(__dirname, '../.env') })
|
||||
|
||||
function isRemoteNode (crypto) {
|
||||
return process.env[`${crypto.cryptoCode}_NODE_LOCATION`] === 'remote'
|
||||
}
|
||||
|
||||
function isRemoteWallet (crypto) {
|
||||
return process.env[`${crypto.cryptoCode}_WALLET_LOCATION`] === 'remote'
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isDevMode,
|
||||
isProdMode,
|
||||
isRemoteNode,
|
||||
isRemoteWallet
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue