It is very simple to get started using Express in Node.js projects. All you need to do is add the express
module, using the following command from the root of your project:
npm install [email protected]
You can also add express
to your package.json
module to ensure that express
is installed when you deploy your application.
Once you have installed the express
module, you need to create an instance of the express
class to act as the HTTP server for your Node.js application. The following lines of code import the express
module and create an instance of express
that you can use:
var express = require('express'),
var app = express();