nhb-express
Version:
Express TypeScript Server Scaffold
16 lines (11 loc) • 420 B
text/typescript
import { authRoutes } from '@/modules/auth/auth.routes';
import { userRoutes } from '@/modules/user/user.routes';
import type { IRoute } from '@/types/interfaces';
import { Router } from 'express';
const router = Router();
const routes: IRoute[] = [
{ path: '/auth', route: authRoutes },
{ path: '/users', route: userRoutes },
];
routes.forEach((item) => router.use(item.path, item.route));
export default router;