Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default dbname is invalid. #33

Closed
sugyan opened this issue Jul 24, 2011 · 0 comments
Closed

default dbname is invalid. #33

sugyan opened this issue Jul 24, 2011 · 0 comments

Comments

@sugyan
Copy link

sugyan commented Jul 24, 2011

MongoStore's constuctor options can use "server_config" instead of "db".
but default dbname is "/dev". this is invalid name for mongodb.

https://gist.github.com/1102625

  , _defaults = {host: '127.0.0.1', port: 27017, dbname: '/dev', collection: 'sessions', reapInterval: 60 * 1000};

maybe it's from 0.x, mongodb connnection used "mongodb://host:port" + dbname style URL.

 url += (hosts[i] || hosts[0]) + ':';
 url += ports[i] || ports[0];
 url += options.dbname ? '/' + options.dbname : defaults.dbname;

but now 1.0.x, connect-mongodb doesn't use this URL. so default dbname should "dev" (exclude slash).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants