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

[FEATURE] Middelware extension/Build steps for serving #339

Closed
1 of 6 tasks
sebbi08 opened this issue Jan 16, 2019 · 4 comments
Closed
1 of 6 tasks

[FEATURE] Middelware extension/Build steps for serving #339

sebbi08 opened this issue Jan 16, 2019 · 4 comments
Labels
enhancement New feature or request module/ui5-server Related to the UI5 Server module

Comments

@sebbi08
Copy link
Contributor

sebbi08 commented Jan 16, 2019

Expected Behavior

Have the posibility to modify served files like transpiling from es6 to es5 without the need of writing an own server.

Current Behavior

The server only combies the project with its dependencies and only for certain files (theme css,version.json,discovery page) generates the on the fly.

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): all
  • Node.js Version: all
  • npm Version: all
  • OS/Platform: all
  • Other information: all

Affected components (if known)

Proposal

This also might be possible in multiple ways.
The first way would be to make the middelwares the server uses extentable. This would allow to add tasks like transpiling,preloading. For preloading this might not be the best way to do this becuase in big projects/libraries this might take some time to generate the preload.

The second way would be to run some build tasks when serving and then afterwards on file change. This would make the initial call longer but reduce the serving time. Also it would make the combination of several tasks on one file easier because when serving the preload you might also transpile the js code boefore generating the preload.

@cschuff
Copy link

cschuff commented Feb 20, 2019

Providing an easy (and well documented) way to hook in custom middleware will give the developer full flexibility to adapt the server however one wants and save you guys from having to implement tons of functionality that does not necessarily belong in the tooling.

I'd strongly prefer extensible tooling with a cookbook/example repo over a bloated, unusable and probably still not sufficient ui5-tooling...

BR
Chris

@RandomByte
Copy link
Member

Thank you for this issue. It sounds very similar to what we plan to do with the "middleware extensibility" bullet point in our roadmap.

We would first start with writing an RFC on it. But the topic should be pretty straight forward.

We would also want to offer the other way around: Consuming UI5 Server middleware in your own server implementation. Technically this is already possible, but the middleware functions are not yet public API. Mainly because we are not yet sure about their signatures. This is likely to clear up in the process of defining the signature for extension middleware.

@RandomByte
Copy link
Member

RFC started: #151

@sebbi08
Copy link
Contributor Author

sebbi08 commented Jul 16, 2019

Hi we tested the and found it working thank you all

@sebbi08 sebbi08 closed this as completed Jul 16, 2019
@RandomByte RandomByte transferred this issue from SAP/ui5-server Nov 20, 2020
@RandomByte RandomByte added enhancement New feature or request module/ui5-server Related to the UI5 Server module labels Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module/ui5-server Related to the UI5 Server module
Projects
None yet
Development

No branches or pull requests

3 participants