Skip to content

Instantly share code, notes, and snippets.

@chiefy chiefy/index.js
Last active Feb 8, 2016

What would you like to do?
weird seneca thing
var seneca = require('seneca')();
.add({role: 'plugin', name: 'poop'}, function onPoop(msg, respond) {
respond(null, {message: 'this is not from plugin poop!'});
seneca.act({role: 'plugin', name: 'poop'}, console.log);
module.exports = function plugin(options) {
this.add({role: 'plugin', name: 'poop'}, function onPoop(msg, respond) {
respond(null, {message: 'this is from plugin poop!'});
return { name: 'plugin' };

This comment has been minimized.

Copy link
Owner Author

chiefy commented Feb 8, 2016

❯ node index.js
2016-02-08T20:20:39.189Z ecosp5nrjixi/1454962839181/35821/- INFO    hello   Seneca/1.0.0/ecosp5nrjixi/1454962839181/35821/-
null { message: 'this is not from plugin poop!' }
❯ node index.js
2016-02-08T20:25:10.431Z e20396s58i76/1454963110418/35945/- INFO    hello   Seneca/1.1.0/e20396s58i76/1454963110418/35945/-
null { message: 'this is from plugin poop!' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.