/nodejs-web-server

Web Server Using Native Node HTTP Module

Primary LanguageHTML

Nodejs Native Web Server

This is a Web Server implemented using Node's native HTTP module.

Usage

To use this web server follow the instructions below:

  1. Install Nodejs and Git on your machine.
  2. Clone this repository to your machine, i.e. git clone https://github.com/ronnieroyston/nodejs-web-server.git.
  3. Open a terminal at the location of the server.js file on your machine and issue the command node server.
  4. Open a web browser on your machine and navigate to 127.0.0.1:8080.

Release Notes

The server assumes a /public directory exists in the location of the Node script and that all HTML files include the .html file extension. This /public directory is the root directory of the web server.

  • Calls to the root directory and its subdirectories read from the index.html at that path.
  • Calls without a file extension have .html added to the URL.