Self-describing routing within controller
- Vorherrschende Sprache
- JavaScript
- Sterne
- 7
- Forks
- 5
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
It would be cool if we could have the option of self-describing routing within controllers, similar to how ASP.NET MVC does it.
``` C#
[HttpGet]
public ActionResult ShowContentList() {
return Render(...);
}
[HttpPost]
public ActionResult SaveContent() {
return Json(...);
}
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
The issue proposes adding attribute-based routing similar to ASP.NET MVC to a generic controller library for Express. Start by examining the existing routing mechanisms in the kontroller codebase, likely in the main controller files. Look for how routes are currently defined and dispatched. Research how Express middleware and routing work, and consider how to annotate controller methods with HTTP verbs. 'Done' would be a working prototype where methods decorated with [HttpGet] or [HttpPost] are automatically registered as routes.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- express, javascript, nodejs
- Bereich
- api, backend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100