Skip to content

Instantly share code, notes, and snippets.

@chrisbolin
Last active November 12, 2015 21:06
Show Gist options
  • Save chrisbolin/e63c0d90d5d73a566159 to your computer and use it in GitHub Desktop.
Save chrisbolin/e63c0d90d5d73a566159 to your computer and use it in GitHub Desktop.
Keystone.js REPL Shell (using Headstone)
var repl = require('repl'),
keystone = require('keystone');
module.exports = function(done) {
var shell = repl.start({
prompt: 'keystone > '
});
// expose keystone to the shell
shell.context.keystone = keystone;
// stop headstone on shell exit
shell.on('exit', function(){
console.info('exiting keystone shell...');
done();
});
};
# npm install --global headstone
headstone shell.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment