Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. The V8 engine compiles JavaScript into machine code in the browser. Node.js is written in C++ and it wraps the V8 engine.
Node.js adds more features to JavaScript as it allows to:
- read & write files on a computer
- connect to a database
- acts as a server for content
On a website, Node.js runs JavaScript on the backend in order to handle requests coming from a browser. It's an alternative to other server-side languages like PHP, Python, Ruby, etc, and enables you to share code between frontend and backend. It also has a huge community and other third party packages & tools to help you in development e.g Express.
Install Node.js on your computer. You can download or update to the latest version here! (you can check the version number installed)
node -v
Here are the JavaScript & other Concepts you should be familiar with before diving into Node.js:
- Functional programming- pure & impure functions
- Asynchronous JavaScript using the promises(.then or async & await)
- general knowledge of HTML & CSS as Node.js projects might use their templates to create a website.
I will be continuing with the other main JavaScript concepts needed in order to start-off with Node.js IN Part 2 of this article. Thank you for taking the time to read this hopefully it will be of help.