A
A
Arman2016-03-31 17:52:27
JavaScript
Arman, 2016-03-31 17:52:27

What advice would you give to a beginner in node.js?

Good day!
I decided to seriously take up node.js, I read the theory to the fullest and it's time to start practicing.
Before a full dive, I decided to ask experienced people for advice, so as not to waste time in vain and where not to "drown" in time. Can someone show their package.json and why are you using certain packages? =)
I started with the basics, completely refreshed my memory and somewhere I learned new things about ES5
Then I read and tried ES6 a little on new browsers and looked a little into ES7, or rather, only async / await, which, as I understand it, now you need to wait in ES8 as minimum.
In general, questions:
1. What framework would you recommend? Basically everything is on Express, but many advise KoaJS, and also SailsJS has impressive stars on github or maybe something else?
2. Now, as I understand the big fight against the hell of callbacks, how best to fight today? Let's say Koa already recommends async/await
https://github.com/koajs/koa/blob/v2.x/docs/api/in...
Should I already use Koa2? While I'll write what's alive, I think there will already be a stable version. Or better on the good old Express? 4? 5? Again, how to fight with callbacks on it? async package? Babel and async/await? co? Himself Promises and generators yuzat?
3. Use mostly all the features of ES6 or as per old articles and books?
Basically, I wanted to get started. Node 5.9.1 and npm are already up and running. It remains to choose a normal framework. Install babel as needed.
What else would you advise immediately, so as not to waste time?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
frontendthug, 2016-03-31
@Arik

1. If you have a lot of time to figure it out yourself, then storm Koa, and if not, then Express. (Personally, I met few guides on the first framework).
2. Connect Babel and use async/await instead of callbacks. Koa v2 is already ready, and recommends using async instead of promises, because the next version will be transferred completely to async / await.
3. New features of course, because they compile to old ones =) That way you won't have to learn these features when they are fully supported in V8.
Also, Koa does not have anything out of the box. But this is not a disadvantage if you like the concept of modularity.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question