Fix: Application should accept incoming requests after all the files are bootstrapped
This commit is contained in:
Родитель
d96ee17570
Коммит
1040d232a0
15
app.js
15
app.js
|
@ -1,9 +1,16 @@
|
|||
let http = require('http');
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Initialize server
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
let app = require('./src/server/app.js');
|
||||
let app = require('./src/server/app.js')
|
||||
// let http = require('http')
|
||||
|
||||
http.createServer(app).listen(config.server.localport);
|
||||
// // eslint-disable-next-line no-console
|
||||
// console.log("App is initialized")
|
||||
// let server = http.createServer(app)
|
||||
// // eslint-disable-next-line no-console
|
||||
// console.log("Server is created")
|
||||
// const listener = server.listen(config.server.localport, function () {
|
||||
// // eslint-disable-next-line no-console
|
||||
// console.log('Listening on port ' + listener.address().port)
|
||||
// });
|
|
@ -1,3 +1,6 @@
|
|||
let http = require('http')
|
||||
|
||||
|
||||
/* eslint no-console: "off"*/
|
||||
require('colors')
|
||||
const async = require('async')
|
||||
|
@ -196,6 +199,15 @@ async.series([
|
|||
|
||||
console.log(`${'\n✓ '.bold.green}bootstrapped for ${app.get('env')}, app listening on ${config.server.http.host}:${config.server.localport}`.bold)
|
||||
log.info(`✓ bootstrapped for ${app.get('env')}!!! App listening on ${config.server.http.host}:${config.server.http.port}`)
|
||||
// eslint-disable-next-line no-console
|
||||
console.log("App is initialized")
|
||||
let server = http.createServer(app)
|
||||
// eslint-disable-next-line no-console
|
||||
console.log("Server is created")
|
||||
const listener = server.listen(config.server.localport, function () {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Listening on port ' + listener.address().port)
|
||||
});
|
||||
});
|
||||
|
||||
// ////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Загрузка…
Ссылка в новой задаче