skewten-incubator / pcb

Middleware-based API framework - It's Koa, but for APIs.
0 stars 0 forks source link

Routing de-facto standard: Express-style routes? #3

Open SEAPUNK opened 8 years ago

SEAPUNK commented 8 years ago

I'm trying to figure out what I want to do with this -- should I allow express-style routes in my PCB routers, or leave it to the adapters? The biggest challenge will be mapping the parameter data to the handler data objects. It would needlessly overcomplicate things.

I'm thinking that the adapters can do their own thing (e.g. express w/ its routes), and it just figures out the mapping of parameter/query/form data -> data object.

SEAPUNK commented 8 years ago

...yeah, for the time being, I will allow only simple routes. We'll figure out what to do from there later on.

Keeping this issue open in case someone else has their idea on how to do this.

SEAPUNK commented 8 years ago

I'll allow params. It will be part of ctx.params. #6