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:
Join 7000+ other code newbies
Last year 7000 newbies learned how to code with me! Totally project oriented.
Subscribe and you'll get access to my classes, coupon codes for tech conferences and totally valuable article on jump-starting your career as a developer.