1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-13 03:02:49 +00:00

updated package.json

This commit is contained in:
2016-01-04 12:25:28 -05:00
parent 3443c97de4
commit 80ca24a715
1168 changed files with 73752 additions and 26424 deletions

17
node_modules/broadway/examples/nodejs/app.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
var broadway = require('../../'),
app = new broadway.App();
// Passes the second argument to `helloworld.attach`.
app.use(require("./plugins/helloworld"), { "delimiter": "!" } );
app.use(broadway.plugins.log, {
logAll: true
});
app.init(function (err) {
if (err) {
console.log(err);
}
});
app.hello("world");
app.emit('world:hello', { meta: 'is here' });

View File

@@ -0,0 +1,23 @@
var HelloWorld = exports;
//
// `exports.attach` gets called by broadway on `app.use`
//
HelloWorld.attach = function (options) {
this.hello = function (world) {
console.log("Hello "+ world + options.delimiter || ".");
}
};
//
// `exports.init` gets called by broadway on `app.init`.
//
HelloWorld.init = function (done) {
//
// This plugin doesn't require any initialization step.
//
return done();
};