This is a simple HTTP web server that hosts very basic HTML pages. The objective of this work is to understand response header content-types, error codes and some methods of Node.js http module. Its a small module of a full stack website project.
- Creating a basic HTTP web server.
- Learned about response header content-type, error codes and some methods of Node.js http module.
- Clone the project
git clone https://github.com/mayankdrvr/http_server.git
- Install Node.js from https://nodejs.org/en/download/ and install git bash from https://git-scm.com/downloads
- Go to the cloned folder in your local system and right click to select Git Bash Here.
- In git bash, run the command
node server.js
- Go to http://localhost:1340/ to view the web server.
- If port:1340 is already occupied by some other process, it can be changed in server.js file in the listen() object of http module.