connect-mongo

Error: no open connections at Db._executeQueryCommand Node.js

空扰寡人 提交于 2019-12-11 11:10:03
问题 I have a node application used with express framework. This application runs smoothly. But suddenly, after some point of time, it starts to give error as "Error: no open connections at Db._executeQueryCommand" From the description of above error, I am just getting that, node application might not be able to make connection to Database. But, in spite of getting this error, some of the pages, that are rendered by node application are able to run. One thing I will like to add is, there's no

connect-mongo creating new session every second

我的未来我决定 提交于 2019-12-08 02:09:34
问题 I have my nodejs app hosted on Openshift. Here are my specs: node v0.10.35, express v3.4.8 My package.json dependencies: "dependencies": { "angular-loading-bar": "^0.9.0", "async": "^2.0.0-rc.5", "bcrypt-nodejs": "0.0.3", "body-parser": "~1.0.0", "connect-flash": "^0.1.1", "connect-mongo": "^1.2.0", "cookie-parser": "~1.0.0", "ejs": "^2.4.1", "express": "~3.4.4", "lodash": "^4.12.0", "method-override": "~1.0.0", "mongodb": "~2.x", "mongoose": "~4.4.12", "morgan": "~1.0.0", "nodemailer": "^2.3

connect-mongo creating new session every second

柔情痞子 提交于 2019-12-06 12:37:39
I have my nodejs app hosted on Openshift. Here are my specs: node v0.10.35, express v3.4.8 My package.json dependencies: "dependencies": { "angular-loading-bar": "^0.9.0", "async": "^2.0.0-rc.5", "bcrypt-nodejs": "0.0.3", "body-parser": "~1.0.0", "connect-flash": "^0.1.1", "connect-mongo": "^1.2.0", "cookie-parser": "~1.0.0", "ejs": "^2.4.1", "express": "~3.4.4", "lodash": "^4.12.0", "method-override": "~1.0.0", "mongodb": "~2.x", "mongoose": "~4.4.12", "morgan": "~1.0.0", "nodemailer": "^2.3.2", "passport": "^0.3.2", "passport-local": "^1.0.0", "recaptcha2": "^1.0.8" }, And here is my server

Store session in operation hook - Loopback

拥有回忆 提交于 2019-11-30 09:55:38
问题 I want to store some data other than userId or accessToken to store in a session, in after save or before save operation hook in Loopback application using express-session . I have this in my server/server.js : .... const session = require('express-session'); const MongoStore = require('connect-mongo')(session); .... app.use(session({ name:'session-name', secret: 'keyboard cat', store: new MongoStore({url: 'mongodb://localhost/test', ttl:1}), resave: false, saveUninitialized: true })); And as

Store session in operation hook - Loopback

╄→尐↘猪︶ㄣ 提交于 2019-11-29 17:23:10
I want to store some data other than userId or accessToken to store in a session, in after save or before save operation hook in Loopback application using express-session . I have this in my server/server.js : .... const session = require('express-session'); const MongoStore = require('connect-mongo')(session); .... app.use(session({ name:'session-name', secret: 'keyboard cat', store: new MongoStore({url: 'mongodb://localhost/test', ttl:1}), resave: false, saveUninitialized: true })); And as I'm defining the remote-method with some parameters it actually passing the parameter and not the req