Skip to content

Commit b391cd4

Browse files
committed
fix configFilePath
fix configFilePath add CONFIG_DIR & CONFIG_FILE to initLocalDev remove CONFIG_PATH from initLocalDev
1 parent 89b4624 commit b391cd4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/config/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function load() {
1212
const port = env.PORT || 3000
1313
const dockerCommand = env.DOCKER || '/usr/bin/docker'
1414
const whichConfig = env.CONFIG || 'production'
15-
const configFilePath = (env.CONFIG_DIR && env.CONFIG_FILE) ? `${env.CONFIG_DIR}${env.CONFIG_FILE}` : 'config/config.json'
15+
const configFilePath = (env.CONFIG_DIR && env.CONFIG_FILE) ? `${env.CONFIG_DIR}/${env.CONFIG_FILE}` : 'config/config.json'
1616
const tokenFile = env.TOKEN_FILE
1717
const usernameFile = env.USERNAME_FILE
1818
const passwordFile = env.PASSWORD_FILE
@@ -140,7 +140,8 @@ function load() {
140140

141141
function initLocalDev() {
142142
/* optionally setup ENV for local dev testing */
143-
// env.CONFIG_PATH = './config/config.json'
143+
// env.CONFIG_DIR = '/usr/src/app/config'
144+
// env.CONFIG_FILE = 'config.json'
144145
// env.DOCKER = 'docker'
145146
// env.TOKEN = env.TOKEN || 'myToken123456'
146147
// env.PASSWORD = env.PASSWORD || 'myPassword'

0 commit comments

Comments
 (0)