mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Started work for having session-logins instead of sending passwords back and forth
This commit is contained in:
@@ -8,6 +8,7 @@ try {
|
||||
}
|
||||
var mongojs = require('mongojs');
|
||||
var db = mongojs('mongodb://' + mongo_config.host + '/' + mongo_config.config);
|
||||
var connected_db = mongojs('mongodb://' + mongo_config.host + '/user_credentials');
|
||||
var ObjectId = mongojs.ObjectId;
|
||||
|
||||
db.collection("chat_logs").createIndex({ "createdAt": 1 }, { expireAfterSeconds: 600 });
|
||||
@@ -15,7 +16,7 @@ db.collection("timeout_api").createIndex({ "createdAt": 1 }, { expireAfterSecond
|
||||
db.collection("api_links").createIndex({ "createdAt": 1 }, { expireAfterSeconds: 86400 });
|
||||
db.on('connected', function(err) {
|
||||
console.log("connected");
|
||||
})
|
||||
});
|
||||
|
||||
db.on('error',function(err) {
|
||||
console.log("\n" + new Date().toString() + "\n Database error: ", err);
|
||||
|
||||
Reference in New Issue
Block a user