91-9990449935 0120-4256464 |
Install Express.jsFirstly, you have to install the express framework globally to create web application using Node terminal. Use the following command to install express framework globally. Installing ExpressUse the following command to install express: The above command install express in node_module directory and create a directory named express inside the node_module. You should install some other important modules along with express. Following is the list:
Express.js App ExampleLet's take a simple Express app example which starts a server and listen on a local port. It only responds to homepage. For every other path, it will respond with a 404 Not Found error. Open http://127.0.0.1:8000/ in your browser to see the result.
Next TopicExpressJS Request
|