don't use discouraged return outside of functions

This commit is contained in:
Evert Prants 2019-01-11 04:42:29 +02:00
parent 4617883f44
commit 4843ed06b2
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -2,7 +2,8 @@
const path = require('path')
const config = require(path.join(__dirname, 'control', 'config.js'))
const env = 'development'
let env = 'development'
let start = true
// Config grabber
for (let i in process.argv) {
@ -15,13 +16,14 @@ for (let i in process.argv) {
process.exit(1)
}
)
return
start = false
} else if (arg === '-p') {
env = 'production'
break
}
}
if (start) {
// Application starter
process.env.NODE_ENV = env
@ -29,3 +31,4 @@ config.read().then(
(c) => require(path.join(__dirname, 'control')),
(e) => console.error(e.stack)
)
}