bugfix - require order causing env to load to early
This commit is contained in:
parent
b7a3ed2e08
commit
fc9657f00d
|
@ -16,6 +16,7 @@ if (env.LOGGER !== "off") app.use(logger())
|
|||
app.use(api.routes())
|
||||
|
||||
module.exports = async port => {
|
||||
port = port || env.PORT || 4001
|
||||
const server = http.createServer(app.callback())
|
||||
return new Promise((resolve, reject) => {
|
||||
server.on("error", e => {
|
||||
|
@ -27,4 +28,4 @@ module.exports = async port => {
|
|||
resolve(server)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue