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:
- Install Nodejs and Git on your machine.
- Clone this repository to your machine, i.e.
git clone https://github.com/ronnieroyston/nodejs-web-server.git
. - Open a terminal at the location of the
server.js
file on your machine and issue the commandnode server
. - 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.