Skip to content

Node.js URL Routing Exercise With The 'url' Package

Notifications You must be signed in to change notification settings

angrbrd/favorites-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Favorites Server

In this exercise we create a simple HTTP server which is running on localhost and demonstrates basic URL parsing and routing.

Required Packages

npm install http
npm install url
npm install fs

Run The Server

First clone the repository:

git clone git@github.com:angrbrd/favorites-server.git

Then run the server with the steps below:

cd favorites-server
node favorites-server.js

You will see the following output on your console:

Favorites server is now listening on http://localhost:8080

Examples

Open your browser and point it to localhost:8080 to see the available links and click on them to observe the routing based on URL. If an unknown URL is entered, a 404 landing page is returned.

About

Node.js URL Routing Exercise With The 'url' Package

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published