hagopj13 / hagopj13/node-express-boilerplate

File-based Routing

Open
#140 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.7k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Hey @hagopj13!

What do you think about using [`express-file-routing`](https://github.com/matthiaaas/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.

```php
├── app.js
├── routes/v1
├── index.ts // index routes
├── posts
├── index.ts
└── :id.ts // dynamic params
└── users.ts
└── package.json
```

- `/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

Contributor guide

Open the contributing guide

Research direction

Review app.js, the /routes directory structure, and package.json alongside the proposed express-file-routing package. Determine whether the routing convention fits this boilerplate and define the expected route mappings before considering adoption.

Written by the indexing model from the issue text.

Assessment

Tech stack
express, node.js
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.