Today We are going to install Nodejs and build our first application, of course a HelloWorld application.
What is Nodejs ?
Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.
It means applications are written in JavaScript, and can be run within the Node.js runtime on OS X, Microsoft Windows, and Linux.
How to install Nodejs ?
To install nodejs go to Nodejs Official website and download Nodejs.
After that launch the installer.
Click next.
Click install.
Click Finish.
Add node to the system path variable.
To confim that everything is ok, launch the (node.js command line) and type ‘node –version’
$ node --version
Work with Nodejs
Create new file ‘app.js’ and type the code above:
console.log("Hello World: ");
Run the application:
$ node app.js
Congratulation! your first application is working