3 ms·
There are some nice libraries that ease the pain of callbacks to a certain degree. Async[1] (the waterfall method) and Step[2] come to mind. [1]: https://gith
by stock_toaster 15y ago
There are some nice libraries that ease the pain of callbacks to a certain degree.
Async[1] (the waterfall method) and Step[2] come to mind.
[1]: https://github.com/caolan/async https://github.com/caolan/async
[2]: https://github.com/creationix/step https://github.com/creationix/step
- forensic 15y agoThis pretty much spoils the whole idea that you'll use your clientside JS on the server though, huh? The callback issue means that client and server are really not running the same language. They sorta look the same I guess.
- yesbabyyes 15y agoI'm not sure about step, but caolan's async is perfectly usable in the browser, as well as in node. That said, code sharing between browser and server often extends to templating, validation and a few utilities, in my experience. More complex logic is better served with message passing or something like dnode.