From 9f8caca6599c17e81e7847d8cd26a77cf6cc021b Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Thu, 30 Jan 2014 04:22:35 -0500 Subject: [PATCH] Add auto_reconnect option to connect-mongo middleware --- app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index ca3db8d5fb..9016fbb9a3 100755 --- a/app.js +++ b/app.js @@ -63,7 +63,8 @@ app.use(express.methodOverride()); app.use(express.session({ secret: 'your secret code', store: new MongoStore({ - db: mongoose.connection.db + db: mongoose.connection.db, + auto_reconnect: true }) })); app.use(passport.initialize());