Skip to content

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.

License

Notifications You must be signed in to change notification settings

swalusimbi/node-js-page-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published