4 ms·
Why learn Node.js: The three most important reasons to use Node.js: it uses JavaScript which you might want to learn already, and second, it has a big ecosyste
by vlad 11y ago
Why learn Node.js:
The three most important reasons to use Node.js: it uses JavaScript which you might want to learn already, and second, it has a big ecosystem of modules and frameworks, including by companies like Microsoft and Google, and third, there is more JavaScript code on GitHub than any other language, if you're looking into contributing to open source projects or learning from them.
What you can do with Node.js:
JavaScript was already important as the language of the web browsers. As soon as JavaScript was split off from the web browsers thanks to the Node.js project, people have been writing web servers as well as command-line tools with it. It's also used to create interactive cross-platform native mobile apps and chrome/firefox extensions.
As a bonus, the asynchronous nature of JavaScript and its ubiquity in web browsers as well as web servers has lead to the creation of a wealth of official and unofficial standards and implementations of libraries for creating real-time chat and systems.
If you can do most everything in one language, why not?
Edit: someone already wrote a more technical overview, if you would like one:
https://news.ycombinator.com/item?id=9830207 https://news.ycombinator.com/item?id=9830207
- hliyan 11y agoDon't forget non-blocking I/O.
- vlad 11y agoThanks, I updated the answer. I left that out because some commenters mentioned that as the leading feature. But for somebody who's asking what Node.js is used for, I don't think being asynchronous is as important a reason as the fact you're writing JavaScript with great tooling, frameworks, and modules. As far as coding day-to-day, there are other languages that have better semantics around writing asynchronous code. And it rarely makes a difference for first-time developers until they actually build something and try to scale, and at that point would need to read articles about doing that with Node.js just like they would with Ruby/Rails, Clojure, Go, etc.