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.
|
|
|
#!/usr/bin/env node
|
|
|
|
var debug = require('debug')('www');
|
|
|
|
var app = require('../app');
|
|
|
|
|
|
|
|
const v8 = require('v8');
|
|
|
|
v8.setFlagsFromString("--max_old_space_size=" + (process.env.BTCEXP_OLD_SPACE_MAX_SIZE || 1024));
|
|
|
|
debug(`Set max_old_space_size to ${(process.env.BTCEXP_OLD_SPACE_MAX_SIZE || 1024)} MB`);
|
|
|
|
|
|
|
|
app.set('port', process.env.PORT || process.env.BTCEXP_PORT || 3002);
|
|
|
|
app.set('host', process.env.BTCEXP_HOST || '127.0.0.1');
|
|
|
|
|
|
|
|
var server = app.listen(app.get('port'), app.get('host'), function() {
|
|
|
|
debug('Express server listening on ' + server.address().address + ':' + server.address().port);
|
|
|
|
|
|
|
|
if (app.onStartup) {
|
|
|
|
app.onStartup();
|
|
|
|
}
|
|
|
|
});
|