mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 09:39:23 +00:00
try latest connect-mongo with a mongostore initialization callback in
attempt to avoid the 'arbiterOnly' error
This commit is contained in:
parent
9db1d7c17e
commit
9d80ffcf3c
2 changed files with 39 additions and 35 deletions
|
|
@ -10,7 +10,7 @@
|
|||
"derby-ui-boot": "git://github.com/codeparty/derby-ui-boot#master",
|
||||
"derby-auth": "git://github.com/lefnire/derby-auth#master",
|
||||
|
||||
"connect-mongo": ">=0.1.9",
|
||||
"connect-mongo": "git://github.com/kcbanner/connect-mongo#master",
|
||||
"passport-facebook": "*",
|
||||
"express": "*",
|
||||
"gzippo": "*",
|
||||
|
|
|
|||
|
|
@ -51,6 +51,10 @@ options =
|
|||
allowPurl: true
|
||||
schema: require('../app/schema').newUserObject()
|
||||
|
||||
# use async callback for initializing app, to make sure we're connected to the database before initting app
|
||||
# this avoids 'arbiterOnly' error (see http://goo.gl/Vs6lW)
|
||||
mongo_store = new MongoStore {url: process.env.NODE_DB_URI}, ->
|
||||
|
||||
expressApp
|
||||
.use(express.favicon())
|
||||
# Gzip static files and serve from memory
|
||||
|
|
@ -68,7 +72,7 @@ expressApp
|
|||
.use(store.sessionMiddleware
|
||||
secret: process.env.SESSION_SECRET || 'YOUR SECRET HERE'
|
||||
cookie: {maxAge: ONE_YEAR}
|
||||
store: new MongoStore(url: process.env.NODE_DB_URI)
|
||||
store: mongo_store
|
||||
)
|
||||
|
||||
# Adds req.getModel method
|
||||
|
|
|
|||
Loading…
Reference in a new issue