import { Router } from "express"; import accountRouter from "./app/modules/account/account.route.js"; import orderRoute from "./app/modules/order/order.route.js"; import planRoute from "./app/modules/plan/plan.route.js"; import profileRoute from "./app/modules/profile/profile.route.js"; import supportRoute from "./app/modules/support/support.route.js"; const appRouter = Router(); const moduleRoutes = [ { path: "/order", route: orderRoute }, { path: "/support", route: supportRoute }, { path: "/plan", route: planRoute }, { path: "/profile", route: profileRoute }, { path: "/auth", route: accountRouter }, ]; moduleRoutes.forEach((route) => appRouter.use(route.path, route.route)); export default appRouter;