Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast and scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, so it’s perfect for data-intensive real-time applications that run across distributed devices.
Is Node.js a back-end or front-end environment? In practice, Node.js can be used in both front-end and back-end scenarios.
There is four points to describe about node js :
1. Node.js is an open source server environment
2. Node.js is free
3. Node.js runs on various platforms. Like Windows, Linux, Mac OS, etc.
4. Node.js uses JavaScript on the server
Here is the ways to install Node JS on MacOS Mojave, you can try it step by step :
1. Connect your PC/Laptop to internet.
2. Go to the website of Node JS on browser.
3. Select one of two choices for download the packages,
4. Download the package and wait for few seconds.
5. After the package is completed download. You can open it.
6. Start to install the package.
7. Just click continue, continue, and continue for agree the licence. Then enter your password of PC/Laptop.
8. Click “close” after installation successfully.
9. Check is npm and node already installed on terminal.
10. Give command on terminal like this :
$ npm -v
$ node -v
11. Try to console the command line of node, check is JavaScript already working on your PC/Laptop
12. give command “node” on terminal
13. try to print Hello world using > console.log(‘Hello World’)
14. try to calculate addition of two numbers > 34+2
15. you can exit the command line of node using > process.exit()