Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 565 Bytes

5.1 - Headers, Query params and Express Assignment.md

File metadata and controls

17 lines (10 loc) · 565 Bytes

Week 05 - 5.1 | Headers, Query params and Express

Assignment #1 - Create an HTTP Server

It should have 4 routes

  1. http://localhost:3000/sum/1/2
  2. http://localhost:3000/subtract/1/2
  3. http://localhost:3000/multiply/1/2
  4. http://localhost:3000/divide/1/2

Assignments on middleware

Assignment #2 - Create a middleware function that logs each incoming request’s HTTP method, URL, and timestamp to the console

Assignment #3 - Create a middleware that counts total number of requests sent to a server. Also create an endpoint that exposes it