How to setup Node.js project in Eclipse

Step by step tutorial on how to setup your Node.js project in Eclipse IDE

This tutorial shows you how to setup a professional web application project using Node.js and Express framework in a Eclipse IDE

Prerequisites

First Download and install Node.js on your machine if you haven’t already.

Then install Express framework using Node.js Command Line: $ npm install -g express
Now Download Eclipse IDE for EE Developers, the Juno package from here. It can be any other Eclipse packages but I recommend using Eclipse EE Juno packages as it comes with many web development packages.

Eclipse IDE

Install Node Eclipse

Update: node eclipse has a new eclipse IDE called Enide, prepackaged with all necessary softwares.

Creating a new Node Project

from Eclipse menu select: file > new > Node Express Project

newNodeProject

Choose a name and location for your project and select a template for your your HTML files. You have two options of Jade template or ejs template. I recommend ejs but it is totally up to you. If you don’t have experience about these templates read more here:

Hi,
I have made simple hello world node js app using node eclipse. Now I want to deploy it on the server. My operating system is Centos 6. Please let me know if you have any solution for the same. Thanks in advance.

I have installed Express Node eclipse and after creating express node.js express project, I am unable to see bin folder which it has to generate by default. If any one knows let me know … I am new to using it

Express is a framework built on top of node.js. express has lots of different libraries that you can use to extend the functionality of node.js. so the difference is one has express framework and other is pure node js project. There are more information on express js website

Hi Patrice, you have always the option to install the packages locally in your project folder with $ npm install express or globally using $ npm install -g express commands. but when it comes to deploying to the cloud you have to make sure you have configured your package.json file to include all necessery packages.

Thanks for the tutorial. I am trying to use other modules that I have installed using ‘npm -g install’, eg. ‘npm -g install esprima’.
While I see the modules listed when typing ‘npm -g ls’ from the console, when I ‘requiring’ them from within app.js using, e.g., esp = require(‘esprima’) I get a “Error: Cannot find module ‘esprima'”: do I need to setup some path in the configuration?