mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
10 minutes chat history, limit of 20 messages
This commit is contained in:
@@ -2,6 +2,8 @@ var mongo_db_cred = {config: 'mydb'};
|
||||
var mongojs = require('mongojs');
|
||||
var db = mongojs(mongo_db_cred.config);
|
||||
|
||||
db.collection("chat_logs").createIndex({ "createdAt": 1 }, { expireAfterSeconds: 600 });
|
||||
|
||||
db.on('connected', function(err) {
|
||||
console.log("connected");
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user