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())
|
app.use(api.routes())
|
||||||
|
|
||||||
module.exports = async port => {
|
module.exports = async port => {
|
||||||
|
port = port || env.PORT || 4001
|
||||||
const server = http.createServer(app.callback())
|
const server = http.createServer(app.callback())
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
server.on("error", e => {
|
server.on("error", e => {
|
||||||
|
|
Loading…
Reference in New Issue