diff --git a/server.js b/server.js index 30b49ed..62d5377 100644 --- a/server.js +++ b/server.js @@ -32,7 +32,7 @@ if (typeof Config.ssl === 'string') { const webtoken = require('sol.webtoken') /*** 通用中间件 ***/ - server.use(require('morgan')('development' === Config.runenv ? 'dev' : 'combined')) + server.use(require('morgan')('development' === Config.prodev ? 'dev' : 'combined')) server.use(require('body-parser').json()) server.use(require('body-parser').urlencoded({ extended: false })) server.use(require('cookie-parser')()) @@ -104,7 +104,7 @@ if (typeof Config.ssl === 'string') { if (err) console.log(err) else console.log( - `[${new Date().toJSON()}] Server listening on ${Config.protocol}://${Config.host}:${portHttp} with IPv4=${ipv4} for ${Config.runenv} environment` + `[${new Date().toJSON()}] Server listening on ${Config.protocol}://${Config.host}:${portHttp} with IPv4=${ipv4} for ${Config.prodev} environment` ) }) } else if ('https' === Config.protocol) { @@ -121,7 +121,7 @@ if (typeof Config.ssl === 'string') { if (err) console.log(err) else console.log( - `[${new Date().toJSON()}] Server listening on ${Config.protocol}://${Config.host}:${portHttps} with IPv4=${ipv4} for ${Config.runenv} environment` + `[${new Date().toJSON()}] Server listening on ${Config.protocol}://${Config.host}:${portHttps} with IPv4=${ipv4} for ${Config.prodev} environment` ) }) } else if ('httpall' === Config.protocol) { @@ -137,7 +137,7 @@ if (typeof Config.ssl === 'string') { else console.log( `[${new Date().toJSON()}] Server redirecting from [${Config.protocol}] http://${Config.host}:${portHttp} with IPv4=${ipv4} for ${ - Config.runenv + Config.prodev } environment` ) }) @@ -155,7 +155,7 @@ if (typeof Config.ssl === 'string') { else console.log( `[${new Date().toJSON()}] Server listening on [${Config.protocol}] https://${Config.host}:${portHttps} with IPv4=${ipv4} for ${ - Config.runenv + Config.prodev } environment` ) }) @@ -170,7 +170,7 @@ if (typeof Config.ssl === 'string') { if (err) console.log(err) else console.log( - `[${new Date().toJSON()}] Server listening on ${Config.protocol}://${Config.host}:${portHttp} with IPv4=${ipv4} for ${Config.runenv} environment` + `[${new Date().toJSON()}] Server listening on ${Config.protocol}://${Config.host}:${portHttp} with IPv4=${ipv4} for ${Config.prodev} environment` ) }) }