4 ms·
A callback is middleware, you can page('/some/path', middleware, callback);
by reaktivo 10y ago
A callback is middleware, you can
page('/some/path', middleware, callback);
- franciscop 10y agoI see, but I don't really like this extra functionality for pagex. I am not looking to copy express with middleware for front-end, just wanted some easy and straight way to load a script if we are in the correct part of the website.
- gberger 10y agoUh, then you and I have very different definitions of "express-like". When I think of express I think of middleware.
- franciscop 10y agoIn the simple way, express accepts a path (url-like fragment) and executes a callback when it matches the url. THAT is what I meant from express-like, but from this and other comments I can see it wasn't clear at all.