Getting Started With NodeJs

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

Create a test file and run it: This is the easiest way to check if Node.js is installed on your system. Create a simple JavaScript file and run it with node. Create JavaScript file and name it test.js and just add simple JavaScript code in the file.

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.

About pushpendupurkait

I am RHCE, DB2, Openstack certified. working on scala and AngularJs for Knoldus.
This entry was posted in JavaScript, Node.js, Scala. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s