1602 / 1602/kontroller

Self-describing routing within controller

Aperta
#7 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
7
Fork
5
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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(...);
}
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
express, javascript, nodejs
Ambito
api, backend
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.