top 10 boilerplate ever

This commit is contained in:
biglyderv 2024-09-07 18:12:58 -04:00
commit d0cc234857
No known key found for this signature in database
GPG key ID: 33AC87E9ACE66954
17 changed files with 567 additions and 0 deletions

13
route.js Normal file
View file

@ -0,0 +1,13 @@
function Route(deps, exec) {
this.deps = deps;
this.exec = exec;
}
Route.prototype.run = async function (req, res, input) {
for (let dep of this.deps) {
input = await dep.run(req, res, input)
};
return await this.exec(req,res,input);
}
export default Route;