/node-js-page-router

This repository contains a simple node.js server file that serves pages based on the url provided by the user. If the url is invalid, it returns a 404 page not found.

Primary LanguageHTMLMIT LicenseMIT

node-js-page-router

This repository contains a simple node.js server file that serves pages based on the url provided by the user. If the url is invalid, it returns a 404 page not found. The serving of the pages is as below:

localhost:8080 should take users to index.html

localhost:8080/about should take users to about.html

localhost:8080/contact-me should take users to contact-me.html

404.html should display any time the user tries to go to a page not listed above.

To run:
node index.js