In our previous tutorial we explained what Node.js is. In this tutorial we will learn how to create a simple node.js program which will print some text on the screen.

If you have properly installed nodejs which can be done from their site, then running this program should be an easy task.

Step 1: Create a HelloWorld.js file in your current directory.

Step 2: Write the following code inside the HelloWorld.js file.

Console.log("Hello World!");

Step 3: From you command prompt / terminal execute HelloWorld.js using the node command.

d:/>node HelloWorld.js

Hello World! should be displayed on your command prompt.

This is a very basic example and we will learn more in future tutorials.

Related Posts

Leave a Reply