Add custom config paths
This commit is contained in:
parent
360398aeec
commit
a8bf2a55d1
1 changed files with 4 additions and 2 deletions
|
|
@ -29,7 +29,7 @@ const server = program => {
|
||||||
|
|
||||||
// load app default configuration data
|
// load app default configuration data
|
||||||
const defaults = require('../config/defaults')(program.mainnet)
|
const defaults = require('../config/defaults')(program.mainnet)
|
||||||
const rootFolder = process.resourcesPath || __dirname
|
const rootFolder = program.rootPath || process.resourcesPath || __dirname
|
||||||
|
|
||||||
// define env variables
|
// define env variables
|
||||||
Dotenv.config()
|
Dotenv.config()
|
||||||
|
|
@ -216,8 +216,10 @@ const server = program => {
|
||||||
next()
|
next()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const storageDirectory = Path.resolve(rootFolder, `${program.rootPath ? '.' : '..'}/.storage`);
|
||||||
|
|
||||||
await Storage.init({
|
await Storage.init({
|
||||||
dir: Path.resolve(rootFolder, '../.storage')
|
dir: storageDirectory
|
||||||
})
|
})
|
||||||
|
|
||||||
const getSessionSecret = async () => {
|
const getSessionSecret = async () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue