In this blog, we will come to know about checking if NodeJs is properly installed in your system and then we will run a small piece of code on NodeJs.
Testing Node: To check if Node is installed properly on your system, open the terminal or command prompt and run command node -v . This should print the version, so it will show you something like this v4.5.0.
c:\node> node -v
console.log(“Hey! Node is working properly.”)
To run this code simply open the terminal or command prompt. Navigate to
the folder where you created the test.js file.
And run the command node test.js. You will see the output on the terminal.
Hey! Node is working properly
c:\node> node test.js
Hey! Node is working properly.
If you can see the output then Node is working properly in your system.