Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- express = require 'express'
- MongoStore = require('connect-mongodb')
- app = express.createServer()
- dbconfig =
- dbname: 'foo'
- username: 'admin'
- password: 'changeme'
- host: 'localhost'
- port: 8000
- app.use express.session(
- secret: "secretkey"
- store: new MongoStore(
- dbname: dbconfig.dbname
- username: dbconfig.username
- password: dbconfig.password
- host: dbconfig.host
- port: dbconfig.port
- collection: "session"
- )
- )
Add Comment
Please, Sign In to add comment