Sputnik
Stage based flow control, used for bootstrapping a Node.js server.
The stages themselves are executed in parallel.
Installation
$ npm install sputnik
What is it for?
It is mainly meant for booting code where you work with plugins.
You define several 'stages' that have functions attached to them.
Then you run your plugins, which can hook into those named stages and run code before or after said stages.
Then you finally 'launch' the rocket and watch your server boot in the order you want.
Functions
Sputnik([options])
Create a new Sputnik
var sputnik = ;
add(name, function)
Define a stage function, but do not begin it just yet. You can return a promise to make the stage wait from ending.
sputnik;
get(name)
Get a stage. Define it (as empty) if it doesn't exist yet.
launch(name)
Begin the stage
after(name, function)
Similar to before()
sputnik
The name parameter can be an array of stage names, then the function will then only be executed when all of the stages has finished.
sputnik