Creating another JavaScript program on an HTTP server

Afonso Antunes
Mar 20, 2021

--

Hi people!!

In this publication, I will demonstrate to you how to make a Javacript program on an HTTP server using node.js.

One of the advantages of node.js is precisely the easy creation of an HTTP server.

The necessary steps for the execution of this are the following:
- Step 1: Create the file named server.js and add the following code:

- Step 2: Open the command line and execute the following code:

node server.js

The end result will be this:

Final result on the HTTP server
Final result on the command line

I hope you enjoyed!!

--

--