Here, you will learn how to create a Node.js web application using Visual Studio.
If you have not installed the project templates for Node.js in Visual Studio, then visit the Setup Visual Studio section.
First of all, create a new project by clicking on New Project.. on the start page or FILE menu. This will open a New Project dialog box as shown below.
As you can see, it has created server.js, which creates a web server listening on the 1337 port and sends the "Hello World" text as a response to any http request.
Press F5 to run the web project. It will open the command prompt and the browser, as shown below.
So now, you can send different responses based on the requested URLs the same way as shown in the Node.js web server section.