Closed hannomalie closed 8 years ago
Hi @hannespernpeintner , The "embedded" is meant for a component that is tightly coupled with the restheart distribution, like the HAL browser, for Web apps that you just want to serve via restheart I'd go for the non-embedded configuration, exactly like the blog example. What's your specific requirement for using the embedded configuration?
you should be able to distribute your app embedding it in the jar. the hal browser does actually work this way.
please paste in a comment your 'static-resources-mounts' configuration
do you also confirm that in the jar the folder caas
is at the same level than the folder browser
, for instrance by running jar -tf restheart.jar | grep caas/
@mkjsix yea, this app is... kind of... coupled to our restheart distribution. Having it not embedded would work as well, but it would be interesting if we did anything wrong, or if you have a bug :)
@ujibang As said, we copied our app directly into the root path of the restheart jar, just where the HAL browser lies. Our 'static-resources-mounts' is the following:
- what: browser
where: /browser
welcome-file: browser.html
secured: false
embedded: true
- what: caas
where: /caas
welcome-file: login/index.html
secured: false
embedded: false
try embedded: true
xD
That's of course what I tried already. The posted one is the currently working configuration with the resources not embedded.
I tried it and got the same issue.
I found a workaround by adding the resources in the jar in a directory (not right under the root)
try as follows
mkdir ext
mv caas ext
now your resources are in ext/caas
add ext to the jar
jar -uf restheart.jar ext
in the configuration file
static-resources-mounts:
- what: ext/caas
where: /caas
welcome-file: index.html
secured: false
embedded: true
I created an issue in our jira, going to fix it in next version: https://softinstigate.atlassian.net/browse/RH-204
Since the workaround with not embedding the folder ist more suitable for us, we go this way. Happy fixing :)
We tried to serve a small angular app via restheart. When we configure the resource as non-embedded, everything works fine. With 'embedded' set to 'true', we tried two scenarios: First, we added a seperate jar containing our app. Second, we simply copied our app into the root path of the restheart.jar file. In both cases, restheart reports a warning and an error:
Our app is completely contained in a folder named 'caas' - within this folder, there are additional folders. We configured this folder in the exact same way as your HAL-browser is configured and embedded, but the error remains. Any ideas?