to generate a starter project with all default options selected. This is good for experimenting with keystone, but will require adjustment to use as an ongoing project, most importantly:
Replace default cloudinary credentials with your own cloudinary credentials
Set up email
Keystone Beta vs. Stable
As of v5.0, the generator will install the latest Keystone 4.0 beta. The beta version is generally safe for production use; the only things blocking a final release are updated documentation, guides and minor cosmetic tweaks.
If you'd prefer to use the old v0.3.x release of Keystone, simply downgrade the version of keystone in the package.json the generator creates and reinstall all dependencies.
Node 0.12 Notes
Both KeystoneJS 4.0 and the generator are compatible with Node 0.12, however we'll be bumping this requirement to Node v6+ in the next version.
Please note that the bundled version of ESLint is only compatible with Node 4+ so if you use this generator with 0.12, make sure you downgrade or remove that dependency.
When you've got your new project, check out the KeystoneJS Documentation to learn more about how to get started with KeystoneJS.
ERR! Please try running this command again as root/Administrator.
When running npm install -g generator-keystone, you may get an EACCES error asking you to run the command again as root/Administrator. This indicates that there is a permissions issue.
On your development system you can change directory ownership to the current $USER so you do not have to run sudo while installing untrusted code:
sudo chown -R $USER /usr/local
# Other directories may be required depending on your O/S
sudo chown -R $USER /usr/lib/node_modules/
For a production/shared environment you may wish to re-run the npm command with the sudo prefix:
sudo npm install -g generator-keystone
For more information, see the "What, no sudo?" of the Intro to npm by Isaac Schlueter.
What do you mean it couldn't find my Database?
By default, KeystoneJS will look for a MongoDB server running on localhost on the default port, and connect to it. If you're getting errors related to the MongoDB connection, make sure your MongoDB server is running.
If you haven't installed MongoDB yet, follow the instructions below.
To connect to a server other than localhost, add a MONGO_URI setting to the .env file in your Keystone project directory:
What do you mean 'yo: command not found'?
When running 'yo keystone', you'll run into this problem if you don't have Yeoman installed. Yeoman is a generator ecosystem.