How to run ExpressJS server from browser ?
Express is the node module which is used to create a server, to take get request on our server. We can run the ExpressJS server from the browser using the following 5 simple steps:
Step 1: Install the Express locally into your system by the following command:
npm install express
Step 2: Check the version of the express server by using the below command in the terminal:
npm ls express
Step 3: Create a file with the name index.js in any project directory.
Step 4: Write down the following code in the index.js file.
Step 5: Run the application using the following steps.
Run the index.js file using the following command:
Output: You will see the following output on console screen.
Now go to your browser and go to http://localhost:5555/ to open the server: