Open matthiaaas opened 3 years ago
Hey @hagopj13!
What do you think about using express-file-routing in this project? It makes the job of creating new routes way cleaner and less time consuming.
express-file-routing
Files inside your /routes directory will get matched an url path automatically.
/routes
├── app.js ├── routes/v1 ├── index.ts // index routes ├── posts ├── index.ts └── :id.ts // dynamic params └── users.ts └── package.json
/routes/v1/index.ts
/routes/v1/posts/index.ts
/routes/v1/posts/:id.ts
/routes/v1/users.ts
Hey @hagopj13!
What do you think about using
express-file-routing
in this project? It makes the job of creating new routes way cleaner and less time consuming.Directory Structure
Files inside your
/routes
directory will get matched an url path automatically./routes/v1/index.ts
→ /v1/routes/v1/posts/index.ts
→ /v1/posts/routes/v1/posts/:id.ts
→ /v1/posts/:id/routes/v1/users.ts
→ /v1/users