Learn anything is always hard. To feel lost and don’t know where to begin.
To help you, who wants (and will) develop in Node.JS, we did this little step-by-step with everything you need to know to find yourself in this runtime created by Ryan Dahl, in 2009, and one of the most used web technologies today.
One step behind
Have you looked at the image above? Take a look again….V8. It’s a JavaScipt’s engine created by Google, written in c++ and used in Chrome.
We did a little explanation about what Node.JS really is and a brief immersion at the runtime guts. Now it’s time to talk what you are looking for*: How to begin with Node.JS
*Hold on! We know that what really matter is to practice. After all is the best way to learn something. But you need to know how things work. This will give you more knowledge and will be easier to put in practice what you will learn. So, you must read the official documentation. Although is much more focus in API, still a good read to learn about the use of the debugger, for example. Will be useful too to take a look at V8 and how Event Loop works. At least, the book “Hands-on Node.JS“, from Paulo Teixeira, is excellent and one of the few focused at the core of Node.JS
Well, here you are, young man hungry for knowledge .
You’re a freshman (this is not a bad thing) and lost. This guide will help you. We don’t want you lost in this giant galaxy.
We separated the guide in Suns.
Objective: Create your first web application with Express.
For this one you will need:
If that was your first “Hello World” your next mission will sound challenging. Complete all previous side quests.
Create an application with Express and MongoDB.
Let’s do like this:
Completing the tutorials you will have a strong base to create CRUDs with Express and MongoDB. But, like almost every tutorial, lack the better structure of the application. Want to know how to structure? Do this side quest.
Recreate the RSS-Feed-Emitter
It’s time to learn new practices and to do this we have Filipe’s tutorial. It’s a great one because goes beyond “make work” and give you the tools to make simple things like publishing at NPM and even more complex tasks like how to test your application.
It’s a 19 steps (counting the bonus parts) tutorial. Follow all steps and, if you do know something, check the links that you can find in the tutorial. https://github.com/filipedeschamps/rss-feed-emitter/issues/119
Publish your application with PM2
It’s time to publish the application created on Sun 3. To publish we will use PM2. Just follow this steps and the process.json will be created. You will also learn a variety of commands that PM2 have.
If you conclude every quest, side quest included, congratulations!! You now have a strong base to start your project with Node.JS. You may be noticed that most part, until here, we used Express.
Like we said at the beginning, is good to start with it. When you use Node.JS you will use together some web framework.
You are going on an adventure…