bugfix - require order causing env to load to early
This commit is contained in:
parent
e6b4598c82
commit
eabcb48bba
|
@ -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