Handling Callback Hell
Practical solutions to asynchronous control flow.
This example repo includes various approaches discussed in the accompanying StrongLoop blog post on managing callback hell. It is required to run Node 0.11.x or higher for the generator examples.
All the dependencies are bundled in the project.
To run the test suite:
To run individual examples, run each file directly:
Various Control Flow Approaches
- nested.js - a nested approach
- flat.js - a modular approach
- async.js - a async module approach
- promise - a promise approach
- generator - a generator approach
- q-generator - a promise/generator approach
Read the accompanying article for more details on the approaches. The Q Generator was an additional approach not mentioned in the article.