Most of the popular browsers today automatically handle the display of raw data output from API on the Web interface. To do this we just have to send the required data directly in API response and the browser will take care of the rest.
- express.js: To handle routing
Setting up environment and Execution:
- Step 1: Initialize node project.
- Step 2: install required modules.
npm install express
Example: Now create a file where we will write down the code to display the output on web interfcae.
Output: To run node server, go to http://localhost:5000 in browser to see output.