Skip to content

Instantly share code, notes, and snippets.

@Colour-Full
Created March 4, 2018 13:00
Show Gist options
  • Save Colour-Full/906f2009b0795408ad3b6abb7e4d7b8b to your computer and use it in GitHub Desktop.
Save Colour-Full/906f2009b0795408ad3b6abb7e4d7b8b to your computer and use it in GitHub Desktop.
Keystone Js with React and Redux
var keystone = require('keystone');
var Types = keystone.Field.Types;
// First we gonna create our User list
var User = new keystone.List('User');
// Then we gonna add the fields
User.add({
name: { type: Types.Name, required: true, index: true },
email: { type: Types.Email, initial: true, required: true, index: true },
password: { type: Types.Password, initial: true },
canAccessKeystone: { type: Boolean, initial: true },
});
User.register();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment