Skip to content

Instantly share code, notes, and snippets.

@Colour-Full
Created July 14, 2018 10:18
Show Gist options
  • Save Colour-Full/b3916362ac2a0903da66040bcff91d13 to your computer and use it in GitHub Desktop.
Save Colour-Full/b3916362ac2a0903da66040bcff91d13 to your computer and use it in GitHub Desktop.
Keystone manual admin creation
var keystone = require('keystone');
var User = keystone.list('User');
exports = module.exports = function (done) {
new User.model({
name: { first: 'admin', last: 'user' },
email: 'admin@keystonejs.com',
password: 'admin',
canAccessKeystone: true,
}).save(done);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment