Open ArunTeltia opened 3 years ago
I am willing to take up this issue.
I have another suggestion regarding the code modularity. Currently the controller functions for each of the routes are written right inside the route definition. Example:
router.get("/", function (req, res, next) {
request(
"https://www.gogoanime1.com/search/topSearch?q=" + req.query.q,
(error, response, html) => {
res.send(response.body);
}
);
});
A good convention to follow is to create a controllers/ directory and have all these controller functions (let's call the above handler function as topSearchHandler) in there so that the api end point just has to call the function:
router.get("/", topSearchHandler)
Yeah sounds reasonable, can you create an issue for this as well so that we don't forget the main aim if this issue. If you want to work on this issue, you can break this issue into parts as this is one of the epic issue that require many files to get changed Assigning this issue to you
Thank you. I'll do that.
Also, there a typo in the issue label refractor
should be refactor
I guess. 😅
Yeah Removed
There is a need of making the code modular. like putting all the anime streaming route in one folder, loader in one folder and manga reader in one folder