mirror of https://github.com/pelias/api.git
missinglink
7 years ago
committed by
Peter Johnson
1 changed files with 5 additions and 9 deletions
@ -1,14 +1,10 @@ |
|||||||
|
|
||||||
const app = require('./app'), |
const app = require('./app'), |
||||||
typeMapping = require('./helper/type_mapping'), |
|
||||||
port = ( process.env.PORT || 3100 ), |
port = ( process.env.PORT || 3100 ), |
||||||
host = ( process.env.HOST || undefined ); |
host = ( process.env.HOST || undefined ); |
||||||
|
|
||||||
// ensure the dynamic type mappings are loaded before starting the server.
|
const server = app.listen( port, host, () => { |
||||||
typeMapping.load(() => { |
// ask server for the actual address and port its listening on
|
||||||
const server = app.listen( port, host, () => { |
const listenAddress = server.address(); |
||||||
// ask server for the actual address and port its listening on
|
console.log( `pelias is now running on ${listenAddress.address}:${listenAddress.port}` ); |
||||||
const listenAddress = server.address(); |
}); |
||||||
console.log( `pelias is now running on ${listenAddress.address}:${listenAddress.port}` ); |
|
||||||
}); |
|
||||||
}); |
|
||||||
|
Loading…
Reference in new issue