Hey, ho, let’s go!
I started with
NodeJS Node.js this weekend because I want to know WHY everyone want to start their new projects with it!
I always say: “Humm… no big deal, I can learn it in a few weeks!”. It’s a bold statement, I admit, but, with this post (and the next ones), I’ll try to explain how I face the new things in my life.
Let’s combine: I help you with my technical knowledge, you help me with my English! Deal?
Node.js, eh?! Well, 1st step: IDE, install, find help!
Choose an IDE! I’ll go with Visual Studio Code. Why? Well, I have used Visual Studio for about 15 years (I think…) and seems to me a good decision! It’s free, light and… It’s Visual Studio! Download it from https://code.visualstudio.com/
For the installation, I navigated to https://nodejs.org/en/download/ and install the LTS version. Why? well I still not prepared to the current, with the latest features!
The instalation was pretty simple! “Next, next, finish”! Go! Try yourself! It’s easy!
For the help, I choose a course on Udemy.
There are very good courses and the bad ones! It’s a lottery but I recommend!
The course answer was very disappointing. The instructor said:
Q. “What is the advantage of using Node.js?”
A. “Provide an easy way to develop scalable networking systems”.
Node.js is a politically neutral language.
Node.js offers speed and a nonblocking I/O API
We’ll talk more about this statement later!
Create a dicrectory for your project. I created “NodeTests/FirstAttempt”
Right click on the folder that you’ll create your project and click on “Open with Code”.
This is what you’ll see:
Now, you need to open the integrated terminal (you’ll need to run some commands there) and, to do this, click on Ctrl + ‘.
This is what you’ll get.
Writing some code and test if it’s working
Create a js file and write something that will be printed on the console.
- At left panel, click on “add” button;
- Name it and don’t forget to put the .js extension;
- At editor (right panel) write something to be printed on the console;
Run the command: node nameOfYourFile.js (mine is names.js) and your message will be shown at console!
If you see this, congrats! The next steps will work too!
Q. What is Node.js? What can I do with Node.js?
A. Everything is here: https://www.w3schools.com/nodejs/nodejs_intro.asp
What I intend to do is make a fully functional website with a names search.
All names is fictional and the purpose is test the binary search performance and a future comparison with a .Net Core project!
How was my English in this post? Let me know!