STEPS:-
index.html
server.js
Now both files are created and ready to go. Now go to your command prompt and navigate to the file and run the command node server.js
**NOTE:- ** In the above file server.js, Content-Type: text/html.
This was just to show that we can create our app by just using NodeJS. But in real life for routing this way will be much more complex as the number of URL increases for our site. Thus, we use ExpressJS library to handle this URL routing. That we will come to know in our next blog.