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

Expose Express App in server.setupFn #983

Closed
Martinsos opened this issue Jan 31, 2023 · 1 comment
Closed

Expose Express App in server.setupFn #983

Martinsos opened this issue Jan 31, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Martinsos
Copy link
Member

In server.setupFn, users could benefit quite a bit from having access to the Express App -> that way they can do some customization, like custom routes or custom middleware!

To pass them app into the setupFn, we merely have to modify line await {= serverSetupJsFnIdentifier =}() in data/Generator/templates/server/src/server.ts to be await {= serverSetupJsFnIdentifier =}(app).
That should be the core of it!

Additional stuff to do:

  1. Modify docs to mention this.
  2. I am not sure if we need to do anything to ensure it is correctly typed by TS, we should possibly look into that. Also, can this be a breaking change then, if it modifies type of serverFn?

The whole issue is quite simple!

@Martinsos
Copy link
Member Author

Done by @shayneczyzewski !

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