-
Notifications
You must be signed in to change notification settings - Fork 8
Create a box of bricks
bredele edited this page Mar 3, 2014
·
1 revision
See artery for mode information.
A brick box is basically a sandbox that allows to create large scale and maintainable applications by splitting into self-contained and small modules. Every module live by its own, is totally independent from an other and communicate with it through an event hub:
var app = require('brick').box();
app.use('chat', chatApp);
app.use('mail',mailApp);A brick box has an API similar to the famous expressjs.
Chat app:
var app = require('brick').box();
app.emit('message', 'hello world');Mail app:
var app = require('brick').box();
app.on('chat/message', function(){
//display chat messages
});See artery for mode details.