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.
17 lines
408 B
17 lines
408 B
|
|
var cluster = require('cluster'), |
|
app = require('./app'), |
|
multicore = false, |
|
port = ( process.env.PORT || 3100 ); |
|
|
|
/** cluster webserver across all cores **/ |
|
if( multicore ){ |
|
// @todo: not finished yet |
|
// cluster(app) |
|
// .use(cluster.stats()) |
|
// .listen( process.env.PORT || 3100 ); |
|
} |
|
else { |
|
console.log( 'listening on ' + port ); |
|
app.listen( process.env.PORT || 3100 ); |
|
}
|
|
|