-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path prefix matching for routes #170
Comments
Why wouldn't you be able to add a route at runtime @mjg123 ? |
Hi there. By "dynamically" I mean that the function wouldn't be able to create new routes for itself depending on (eg) something from a data store. For example a This isn't really a separate requirement - we would like to have a single prefix (eg |
related to this iron-io/functions#77 |
One example of a use case for this is a function that serves a static file: You'd expect the filepath to look something like Another example is a function serving a Single Page Application that works with client-side routing á la React Router. I want the |
It'd be great to be able to treat a route as a prefix when matching, rather than having to match exactly. For example:
This doesn't mandate that path params to be evaluated by the fn platform, as long as the entire request URL is passed into the function we can do that ourselves.
This request would be especially useful for https://github.com/bbilger/jrestlesss - we can define an application with a base-url and many sub-resources hosted in a single function. This is hard work at the moment as we need to create a lot of routes in the fn platform, and are not able to dynamically add a route at runtime.
The text was updated successfully, but these errors were encountered: