Guest User

Untitled

a guest
Jan 22nd, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. express = require 'express'
  2. MongoStore = require('connect-mongodb')
  3. app = express.createServer()
  4.  
  5. dbconfig =
  6. dbname: 'foo'
  7. username: 'admin'
  8. password: 'changeme'
  9. host: 'localhost'
  10. port: 8000
  11.  
  12. app.use express.session(
  13. secret: "secretkey"
  14. store: new MongoStore(
  15. dbname: dbconfig.dbname
  16. username: dbconfig.username
  17. password: dbconfig.password
  18. host: dbconfig.host
  19. port: dbconfig.port
  20. collection: "session"
  21. )
  22. )
Add Comment
Please, Sign In to add comment