mirror of https://github.com/pelias/api.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
534 B
14 lines
534 B
|
|
const app = require('./app'), |
|
typeMapping = require('./helper/type_mapping'), |
|
port = ( process.env.PORT || 3100 ), |
|
host = ( process.env.HOST || undefined ); |
|
|
|
// ensure the dynamic type mappings are loaded before starting the server. |
|
typeMapping.load(() => { |
|
const server = app.listen( port, host, () => { |
|
// ask server for the actual address and port its listening on |
|
const listenAddress = server.address(); |
|
console.log( `pelias is now running on ${listenAddress.address}:${listenAddress.port}` ); |
|
}); |
|
}); |