Skip to content

hyjin/node-addon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-addon

Make your app modular

Usage

var addon = require('addon');

var app = {};

addon.call(app, __dirname + '/plugins/*.js');

app.hello();

// console output
hello, anonymous

In plugins/hello.js:

module.exports = function helloPlugin() {
  var app = this;
  app.hello = function (name) {
    console.log('hello, ' + name || 'anonymous');
  };
};

About

Make your app modular

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published