

Node.js: the good, the bad, the ugly - why the hell would you use it? - zappan
http://www.toptal.com/nodejs/why-the-hell-would-i-use-node-js

======
rpedela
I strongly disagree with not using Node.js for "server-side web app with
relational DB behind". I have used both the PostgreSQL and MySQL modules and
they do just about everything you need. There is a module called "any-db"
which makes transactions and connection pools a breeze.

It seems the author is specifically talking about ORMs. I have not used them
in Node.js so maybe they are immature. Saying "don't use Node.js ORMs" is very
different to "don't use Node.js with relational DBs". The former may be
correct, but the latter certainly is not.

~~~
falcon86
I'm fairly new to web development, but I've been thinking about starting a
Node.js project backed by a PostgreSQL database lately. I was planning on
using express to create an API of some sort to do all the database queries and
return relevant information in JSON, then create the website front-end with
something like Angular and have it just communicate with the API returning the
JSON. Is there a better approach?

~~~
rpedela
Use node-postgres for the DB piece. If your server is just going to be a REST
API then use node-restify. If you want the server to serve a website (html,
css, js) then use express. I have not used Angular so I cannot comment.

------
zappan
Own a business, starting up, or just want to convince your client, boss or the
stakeholders why Node.js is the right way to go? Are you sure you are making
the right choice, or need a supporting evidence? Lots has been written about
Node.js, but people tell me they couldn't find it summarized in one place, so
here it is - the good, the bad and the ugly of Node.js - if you fit in, just
use it!

------
anonyfox
I'd add that node.js is even a good enough tool for heavy computation. Do not
crunch the numbers in the main event loop, but spawn a worker-cluster and
you're fine.

Do not forget that the raw speed of the V8 (not to mention C++ modules for
more speedup) outperforms other current scripting languages like ruby.

