refactor: dev mode
This commit is contained in:
@@ -17,8 +17,6 @@ let wiki = {
|
||||
}
|
||||
global.wiki = wiki
|
||||
|
||||
process.env.VIPS_WARNING = false
|
||||
|
||||
// if (wiki.IS_DEBUG) {
|
||||
// require('@glimpse/glimpse').init()
|
||||
// }
|
||||
|
@@ -152,10 +152,10 @@ module.exports = async () => {
|
||||
wiki.logger.info(`HTTP Server on port: [ ${wiki.config.port} ]`)
|
||||
|
||||
app.set('port', wiki.config.port)
|
||||
let server = http.createServer(app)
|
||||
wiki.server = http.createServer(app)
|
||||
|
||||
server.listen(wiki.config.port)
|
||||
server.on('error', (error) => {
|
||||
wiki.server.listen(wiki.config.port)
|
||||
wiki.server.on('error', (error) => {
|
||||
if (error.syscall !== 'listen') {
|
||||
throw error
|
||||
}
|
||||
@@ -173,7 +173,7 @@ module.exports = async () => {
|
||||
}
|
||||
})
|
||||
|
||||
server.on('listening', () => {
|
||||
wiki.server.on('listening', () => {
|
||||
wiki.logger.info('HTTP Server: [ RUNNING ]')
|
||||
})
|
||||
|
||||
|
@@ -64,7 +64,9 @@ module.exports = {
|
||||
})
|
||||
|
||||
cluster.on('exit', (worker, code, signal) => {
|
||||
wiki.logger.info(`Background Worker #${worker.id} was terminated.`)
|
||||
if (!global.DEV) {
|
||||
wiki.logger.info(`Background Worker #${worker.id} was terminated.`)
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
@@ -61,7 +61,6 @@ module.exports = Promise.join(
|
||||
// ----------------------------------------
|
||||
|
||||
process.on('disconnect', () => {
|
||||
wiki.logger.warn('Lost connection to Master. Exiting...')
|
||||
process.exit()
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user