测试:启动时打印环境
This commit is contained in:
@@ -53,6 +53,7 @@ app.set('name', 'chatofpomelo-websocket');
|
|||||||
// 加载数据库和redis
|
// 加载数据库和redis
|
||||||
app.configure(function() {
|
app.configure(function() {
|
||||||
app.loadConfig('database', app.getBase() + '/config/database');
|
app.loadConfig('database', app.getBase() + '/config/database');
|
||||||
|
console.log('env:', app.get('env'));
|
||||||
|
|
||||||
mongoose.connect(app.get('database').mongo, { useNewUrlParser: true, useUnifiedTopology: true, useCreateIndex: true, useFindAndModify: false }, (err) => {
|
mongoose.connect(app.get('database').mongo, { useNewUrlParser: true, useUnifiedTopology: true, useCreateIndex: true, useFindAndModify: false }, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user