Upgrade dependencies and migrate from Joi to Zod for validation

This commit is contained in:
Juan Sebastián Montoya 2025-02-10 22:41:08 -05:00
parent 4fa0190e4b
commit a26d0c77a1
12 changed files with 498 additions and 287 deletions

15
src/routes/index.ts Normal file
View file

@ -0,0 +1,15 @@
import Router from 'koa-router';
import { readdirSync } from 'fs';
const router = new Router<any, any>();
readdirSync(__dirname)
.filter((file) => file.includes('.route.') && !file.startsWith('health.'))
.forEach((file) => {
const routesFile = require(`${__dirname}/${file}`).default;
router.use(routesFile.routes(), routesFile.allowedMethods());
});
export default router;
export { default as healthRoute } from './health.route';