Moved files to config folders, and updated pm2 command

This commit is contained in:
Kasper Rynning-Tønnesen
2017-10-17 14:12:49 +02:00
parent c7816f5d15
commit 70360f3760
9 changed files with 17 additions and 30 deletions

View File

@@ -1,6 +1,7 @@
var mongo_db_cred = {config: 'mydb'};
var path = require('path');
var mongo_config = require(path.join(path.join(__dirname, '../config/'), 'mongo_config.js'));
var mongojs = require('mongojs');
var db = mongojs(mongo_db_cred.config);
var db = mongojs(mongo_config.config);
db.collection("chat_logs").createIndex({ "createdAt": 1 }, { expireAfterSeconds: 600 });