express-skeleton
yarn install
# or npm install
yarn dev
# npm run dev
middleware
// src/routes/auth.route.ts
this.router.use(AuthMiddleware); // for all
this.router.post('/register', AuthMiddleware, this.authController.register); // for single
// src/app.ts
app.use(AuthMiddleware); // 全域
架構圖
/src controllers/ middleware/ requests/ routes/ app.ts router.ts