mirror of https://github.com/pelias/api.git
Julian Simioni
7 years ago
committed by
GitHub
1 changed files with 6 additions and 4 deletions
@ -1,8 +1,10 @@ |
|||||||
|
|
||||||
const app = require('./app'), |
const app = require('./app'), |
||||||
port = ( process.env.PORT || 3100 ), |
port = ( process.env.PORT || 3100 ), |
||||||
host = ( process.env.HOST || 'localhost' ); |
host = ( process.env.HOST || undefined ); |
||||||
|
|
||||||
/** run server on the default setup (single core) **/ |
const server = app.listen( port, host, () => { |
||||||
console.log( `pelias is now running on ${host}:${port}` ); |
// ask server for the actual address and port its listening on
|
||||||
app.listen( port, host ); |
const listenAddress = server.address(); |
||||||
|
console.log( `pelias is now running on ${listenAddress.address}:${listenAddress.port}` ); |
||||||
|
}); |
||||||
|
Loading…
Reference in new issue