Skip to content
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

Allow setting Express Router as the custom api endpoint? #2366

Open
Martinsos opened this issue Nov 6, 2024 · 0 comments
Open

Allow setting Express Router as the custom api endpoint? #2366

Martinsos opened this issue Nov 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Martinsos
Copy link
Member

Right now, for custom api endpoint in Wasp, you need to provide a JS function that is Express middleware.

If would be cool if you could also provide an Express Router, which is (in a way) a higher-level construct, in the sense that it captures multiple api endpoints in it, that you can mount all together under a route. I am not sure if we should just allow registering it as a custom wasp api endpoint, or if we should add a special support for it at Wasp DSL level, next to custom api endpoint -> this deserves some consideration, and should be included with thinking in general about the custom api endpoint API design.

@Martinsos Martinsos added the enhancement New feature or request label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant