Skip to content

Instantly share code, notes, and snippets.

@catarak
Last active April 26, 2017 15:05
Show Gist options
  • Save catarak/ec1bb26a95fd538d0ebb8b2c6b4231cf to your computer and use it in GitHub Desktop.
Save catarak/ec1bb26a95fd538d0ebb8b2c6b4231cf to your computer and use it in GitHub Desktop.
module.exports = function(options) {
var seneca = this;
seneca.add({role:'todo', cmd:'create', createTodo);
function createTodo(args, done) {
var todoText = args.text;
// ... perform todo creation
done(null, todo);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment