Hacker News new | past | comments | ask | show | jobs | submit login

There are two situations where I'd start another project in Node.js:

1) there's an unusual amount of logic shared between browser and server

2) a web layer needs to be isomorphic

Node hits a sweet spot for these, but it's not my choice any more for non-web servers like the micro-services that back up mobile and single page apps.

I abandon Node.js after a first project years ago because of the callback soup. I came back when promises promised an alternative. Now I run into situations where promises cascade up from a few async calls and affect every API built on top of them. Perhaps async/await will improve the situation.

I'm curious where Node.js fits for other people.




> Now I run into situations where promises cascade up from a few async calls and affect every API built on top of them

Can you elaborate what you meant by that?


If you have a synchronous function that suddenly needs to do something asynchronous, then everything that uses that function needs to become async too.

http://journal.stuffwithstuff.com/2015/02/01/what-color-is-y...


Exactly, thanks.


I basically agree, but using async/await has really changed my reluctance to use node. It's the best thing to happen to JS in a very long time.


I've recently started working with the KoaJs framework (http://koajs.com/) which basically uses ES6 Generators to avoid callbacks.

I'm loving that and the fact that it's so minimal - everything happens in small middlewares.


For 1, I'd use clojure/script




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: