Merge pull request #156 from tschaub/no-callback
Remove unused callback
This commit is contained in:
commit
c03b0a12f8
1 changed files with 1 additions and 6 deletions
|
@ -28,7 +28,7 @@ if (!isLight) {
|
|||
serve_rendered = require('./serve_rendered');
|
||||
}
|
||||
|
||||
module.exports = function(opts, callback) {
|
||||
module.exports = function(opts) {
|
||||
console.log('Starting server');
|
||||
|
||||
var app = express().disable('x-powered-by'),
|
||||
|
@ -41,8 +41,6 @@ module.exports = function(opts, callback) {
|
|||
|
||||
app.enable('trust proxy');
|
||||
|
||||
callback = callback || function() {};
|
||||
|
||||
if (process.env.NODE_ENV == 'production') {
|
||||
app.use(morgan('tiny'));
|
||||
} else if (process.env.NODE_ENV !== 'test') {
|
||||
|
@ -359,15 +357,12 @@ module.exports = function(opts, callback) {
|
|||
var server = app.listen(process.env.PORT || opts.port, process.env.BIND || opts.bind, function() {
|
||||
console.log('Listening at http://%s:%d/',
|
||||
this.address().address, this.address().port);
|
||||
|
||||
return callback();
|
||||
});
|
||||
|
||||
process.on('SIGINT', function() {
|
||||
process.exit();
|
||||
});
|
||||
|
||||
setTimeout(callback, 1000);
|
||||
return {
|
||||
app: app,
|
||||
server: server
|
||||
|
|
Loading…
Reference in a new issue