Today I have been playing with @substack's node-seq module, it allows me to chain together async functions.
https://github.com/substack/node-seq
I got it working with parallel functions, but having trouble running functions sequentially. Whenever I run the following code, it only prints out the 'hello1' statement. Any ideas what I'm doing wrong?
var Seq = require('seq');
Seq()
.seq(function () {
console.log('hello1');
})
.seq(function () {
console.log('hello2');
})
;
Thanks for any suggestions!
You just need to read the documentation
this
should solve your problem.Otherwise
Seq
has no way of knowing when the step is done.