Best Node.js Explanation For a Newbie

Best Node.js Explanation For a Newbie

Why is this the best node.js explanation for a newbie

It is plain and right to the point, if you are a seasoned programmer this may seem silly but honestly, everything out there was too in-depth for me to understand. Knowing about Node.js is important for a full stack developer, but being confused and not wanting to learn it is another challenge. Above I spoke of how node.js uses your code and how you can expect it to work once you start learning more about it. There is nothing like documentation so I recommend rolling over to NODE.JS after this and checking out the documentation.

What is node.js:

It is an environment that allows you to run javascript also known as a runtime environment. At first, JS was solely used in the browser, but the creators realized that there was so much more power available such as running a stand-alone application. Now with Node.js, the language has similar capabilities of popular scripting languages such as python.

Both Javascript and Node.js use the V8 JavaScript runtime engine. This takes your code and turns it into code that your computer can read without having to interpret it first. In short, it speeds up the process of a computer reading your code allowing for magical things to happen. Node.js is event-driven and does not block the input or output. That alone can tell you the beauty of this as it keeps it simple and executes what’s needed based on the event instead of worrying about the bits and pieces.

How you normally execute javascript

In the past, you would create a local HTML file on your computer then add a call to a relative JS file. From there you can open it up in a browser and play with it in the console. But that was the environment and in my mind made it to where being limited to just that made me feel that other than some functionality on a website that was all to be had. Then Node.js comes along and as mentioned before that RunTime Environment takes what I described out of the equation and opens to the doors for so many possibilities.

Node.js example

  1. First you need to have node installed on your computer
  2. Open your terminal / command line and type node -v
  3. Now you will see the version you have on  your computer
  4. Create a folder and put a normal js file in there stuff.js
  5. Navigate to that folder in the terminal and type node stuff.js

BOOM you will see your code executed without having to be on a browser.

Conclusion

Once again this was not for someone who is looking for that technical aspect of node and what it does but instead just the best node.js explanation for a newbie. Nothing was talked about NPM which is really neat and stands for Node Package Manager. What was talked about is this awesome way that you can execute JavaScript without the limits of a browser and hopefully you will continue to explore more of this amazing portion of web development. I write about things I am doing or dealing with just like my SEMRush tool breakdown or SEO for images, if you really like my style then sign up for the email below.

Tags: , , ,
%d bloggers like this: