Then our getting started guide can be:
$ npx create-keystone-app my-app
# or
$ yarn create keystone-app my-app
$ cd my-app
$ npm start
馃帀
I want to take this up. prefer npx/yarn or yo?
We can have several template like basic, login, blog etc. Do you think We should create something similar to Keystone-generator but with next.js?
Do you think We should create something similar to Keystone-generator but with next.js?
We can definitely have something like that in the future, I like it!
However, for this particular issue, I was thinking of something straight forward like create-next-app, where all it does is setup a basic project for you in the directory you give it:
$ npx create-keystone-app my-keystone-app
my-keystone-app/package.json
{
"name": "my-keystone-app",
"version": "0.0.0",
"scripts": {
"start": "keystone"
},
"dependencies": {
"@voussoir/adapter-mongoose": "^2.0.0",
"@voussoir/admin-ui": "^1.0.0",
"@voussoir/fields": "^3.0.0",
"@voussoir/keystone": "^0.0.0"
}
}
my-keystone-app/index.js
const { Keystone } = require('@voussoir/keystone');
const { AdminUI } = require('@voussoir/admin-ui');
const { MongooseAdapter } = require('@voussoir/adapter-mongoose');
const { Text } = require('@voussoir/fields');
const keystone = new Keystone({
name: 'My Keystone App',
adapter: new MongooseAdapter(),
});
keystone.createList('Todo', {
fields: {
name: { type: Text },
},
});
const admin = new AdminUI(keystone);
module.exports = {
keystone,
admin,
};
I want to take this up. prefer npx/yarn or yo?
npx & yarn both work the same way - they just execute the default binary of the create-X package.
I think yo isn't necessary for the first version of this.
cool, I will work on this.
A suggestion from @mitchellhamilton: Check that mongo is installed and suggest the user to install it with brew install mongo if on OSX.
馃憜 This can be after the initial version, but would be nice to help folks just getting started.
iiirc, it鈥檚 brew install mongodb