-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Did not ask to start mongod #272
Comments
Yes, that would be nice to work with |
I don't have MongoDB installed on my machine. I'm connecting to a remote instance, so I don't think that would make sense. Did you read the "Getting Started" page on keystonejs.com ? Under "Prerequisites":
Also, under "Problems ?":
|
I know that it's covered in the documentation, and also it's pretty easy to understand what's going on from the error displayed. However, I also believe that a part of good user experience for developers is to catch such errors and display a friendly message. There's no need someone should look for solution in documentation when it can be displayed in place. More importantly, the yo generator finish with information that you should run "node keystone" to start the application, which is false – the generated application is configured to expect mongo running locally, which is not mentioned. Following the on-screen instructions leads to an error – this should never be the case. Running mongod as a part of Keystone does make sense. Keystone can easily check whether it's configured to connect to a local or remote db, then in case of local check whether the database is running, and then run it as a subprocess. As a proof of concept, check out Meteor.js. That's more or less how it works there. |
Interesting idea. My initial thoughts were that this isn't something Keystone should be responsible for (similar to @kirkov 's point) but @subhog makes a good point that it could be done as a fallback when looking for a database on localhost. We should definitely update the yeoman generator to prompt for a remote connection uri, and mention running |
I'm just afraid that running @JedWatson |
I don't think it makes sense to run or install Looks like keystonejs/generator-keystone#12 would add a reasonable sanity check that there is a MongoDB connection available. |
For myself I never use the default localhost:27017 for any mongo project. So by default this was busted for me. Maybe add messaging somewhere that the configuration for a custom mongoUri is located in the |
This is a documentation issue, so I've moved this to keystonejs/keystonejs-site#86! |
Hey subhog, Thanks for posting this. |
Nowhere during generating my application I was instructed to start
mongod
myself, I only found out it's necessary afternode keystone
failed to connect to the db. It would be more user friendly to either:mongod
before startingnode keystone
,mongod
as a part ofnode keystone
by default.The text was updated successfully, but these errors were encountered: