FACG5 / AE-News

0 stars 0 forks source link

File structure #23

Open NouraldinS opened 6 years ago

NouraldinS commented 6 years ago

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.

HemaSAli commented 6 years ago

thanks nour , I fixed it

NouraldinS commented 6 years ago

@HemaSAli Then close the issue :)