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 server configuration with type module #536

Closed
LukasHeimann opened this issue Jul 14, 2021 · 3 comments
Closed

Allow server configuration with type module #536

LukasHeimann opened this issue Jul 14, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@LukasHeimann
Copy link

Is your feature request related to a problem? Please describe.

I want to use the ui5 cli to serve multiple UI5 apps at once, ideally in a fiori launchpad, with live reload. With type: module, I can mount my apps like this:

resources:
  configuration:
    paths:
      /app1/: app1/webapp
      /app2/: app2/webapp

I try to configure the community live reload extension like this:

server:
  customMiddleware:
  - name: ui5-middleware-livereload
    afterMiddleware: compression
    configuration:
      debug: true
      extraExts: "xml,json,properties"
      port: 35729
      watchPath:
        - app1/webapp
        - app2/webapp

However, this fails the schema validation. However, I can start a server if I don't try to configure it, which makes me feel that either ui5 serve should fail for modules, or I should be able to configure it.

I went ahead and just added the definition in the schema definition in node modules. With this, validation passed and the server came up with the middleware running (and working fine)

Describe the solution you'd like

Please add the server options for type: module.

Describe alternatives you've considered

I've tried to switch to type application, but then I wasn't allowed the path configuration I needed.

Maybe this is beyond the current scope and requires a new module type in the long run, but as a shorter-term solution allowing the middleware would already be great.

Thank you for considering this requeset!
Kind regards
Lukas

@LukasHeimann LukasHeimann added the enhancement New feature or request label Jul 14, 2021
@RandomByte
Copy link
Member

Thanks for reaching out 👍

If my understanding is right, this seems to be a workaround for #45

I think the main question is indeed whether we want to allow starting a ui5 server for a module only.

Since ui5-server currently does not require any special information from the root project, and since it's perfectly capable of serving a module project as a dependency, it might be reasonable to simply allow this and enhance the schema to allow server configuration for type module. We'll discuss this in the team and get back to you.

@RandomByte
Copy link
Member

Tracking this internally as CPOUI5FOUNDATION-376

Maybe we can get it into the specification version 2.5 release (SAP/ui5-project#416)

RandomByte added a commit to SAP/ui5-project that referenced this issue Jul 16, 2021
@RandomByte
Copy link
Member

RandomByte commented Jul 26, 2021

This is possible with the latest UI5 CLI (v2.12.0) and by declaring specVersion: 2.5

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

2 participants