Tutorial 2 NodeJS- Eclipse Plugin Installation

In my previous post, I wrote how to install NodeJS. Now in this post, I will give a brief guide about how to install the eclipse plugin for NodeJS.

You can download the plugin from the site directly or you can install it directly in your eclipse through Eclipse Marketplace.I am using Eclipse Mars in all my coding experiments. Just go to the Eclipse Marketplace and type “enide” and enter. You will be given a list of available plugins.

I have installed the plugin as shown in the picture.

eclipse_market
Enide plugin

Now click and next and next. In the available features screen, you can either choose all or only what you need. I specifically chose those that are necessary for nodejs and express development. Choose them and click and you are done.After proper installation open Eclipse IDE and click File -> New. You should be able to see the following options as shown in the figure,

Now, choose the File ->New -> Node.js Project and choose the “Hello World” template and finish. Please follow the figure below.

helloworld
Choose template

After Finish, Eclipse will create the project structure for you. Please look at the Figure below,

Workspace 1_003

There is nothing in the skeleton. One important thing to notice, the file named as project.json. If you are from Java background, you can find similarity with Maven pom.xml. All the dependencies can be declared in this file and they are downloaded on executing npm install command. (Will be explained in the next posts).

In the file hello-world-server.js,there is nothing for now. Only one statement console.log(‘Hello World!!!’). Now right click on this file and choose Run As -> Node Application. You should see the desired output as shown in the figure below.

code

Okay, that’s all for now. In the next posts, we will dig more and discover whats more in the bag.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s