diy-node-router icon indicating copy to clipboard operation
diy-node-router copied to clipboard

A node-based router that emulates the Express.js router

Understanding Express.js: Creating Your Own Node HTTP Request Router

This repository accompanies the article "Understanding Express.js: Creating Your Own Node HTTP Request Router." The repository contains a do-it-yourself node router that emulates the functionality of the Express.js router.

Installation

To install this project, first clone the repository:

git clone https://github.com/nas5w/diy-node-router.git

Install the dependencies using npm:

npm i

Run the App

Run the app using node:

node .

To see the app in action, navigate to the following url's in your web browser of choice:

  • http://localhost:3000
  • http://localhost:3000/test-route
  • http://localhost:3000/bad-route
  • http://localhost:3000/user/johndoe
  • http://localhost:3000/user/janesmith