I'm writing a web crawler in Node. It will crawl my various bank accounts and provide me with a summary of my finances. Acknowledging the security issues around this, i'm just doing it as a proof of concept.
I'm having a problem with structuring my application.
So far my controller modules are:
Are these valid controller modules, or are they more suited for a directory such as /lib/?
At the end of the day it doesn't matter for the functionality of the project, but I'm presenting it at the end of the week.
Controllers are the things, which process requests by glueing models and views. The router routes a request to a controller, this one calls methods of models in order to render a view.
Since most of your code is just code to fulfill some specific tasks, which have nothing to do with the frontend code of your application: No, most of the code is nothing I would call controller code.
As you already said it makes more sense to group that into modules and put it in other directories. These functions are either called by the controllers, to render the frontend, or (more likely) are called via cronjobs to update the database.