You seem to have mixed this up.
Your handler.js is actually your router.js by content.
And your functions.js is actually your handler.js by content.
A router.js (or mainController.js later) is the file responsible for distributing tasts to your handlers or other controllers based on the route itself.
A handler.js (or pageController.js later) is the file responsible for delivering a single response for a single route or multiple routes, handling the request, and it's response.
You seem to have mixed this up. Your
handler.js
is actually yourrouter.js
by content. And yourfunctions.js
is actually yourhandler.js
by content.A
router.js
(ormainController.js
later) is the file responsible for distributing tasts to your handlers or other controllers based on the route itself.A
handler.js
(orpageController.js
later) is the file responsible for delivering a single response for a single route or multiple routes, handling the request, and it's response.