baseprime / grapnel

The smallest JavaScript router with named parameters, HTML5 pushState, and middleware support
http://grapnel.js.org
468 stars 40 forks source link

Using Middleware with Object Literal Routes #70

Closed danajanezic closed 7 years ago

danajanezic commented 7 years ago

From the documentation it is unclear whether it is possible to use middleware when your routes are defined with object literals. Is it possible? If so how?

baseprime commented 7 years ago

@danajanezic If you're using Grapnel.listen(), you won't be able to define middleware.