It’s been a long time since I did one of these, I’ve just been too busy with tinkering with JS which is turning out to be my favorite language. This is again from the nodebeginner book by Manuel Kiessling.
Anyways after assembling your router,it must route specific requests to their appropriate destinations. In this case the requests such as start and upload are routed to request handlers. Mindless analogy: if cars and trucks are requests then the router is like a road and the request handlers like toll booths which collect the appropriate fare from cars, trucks etc.
1) Create a requestHandler.js file
2) Fill with this code: