EXPRESS
Express is a server framework.Express is designed for developing web applications and RESTful APIs. Basically Express provides the tool to build our web application. Nodejs NPM give us much modules for express, using that we can install Express.
Requirements to install Express
To start with express you need to have
Node
Npm
Let’s see how to install express , before installing express. Check the version of npm and node.
Run the following commands in terminal
node — version
npm — version
If you get the version number as output, there is no problem, we can continue to install express.
Run the following code to install express
After installing sucessfully.You can check package.json file which is there in project structure. In that under dependencies you can see express as follows :
This all we needed to develop a application using Express. We enhance needed to install nodeman.
Nodeman makes the tool easier , it restarts the server as soon as we make changes. We don;t have to call npm install again and again, In order to install nodeman.
Run the following code.
After installing the necessary dependencies . We can move into do setup the development. Create a new file called index.js
Run commands as nodeman index.js