Reputation: 1355
What I want to achieve is a basic JHipster Project with the FrontEnd (in my case Angular) that is served by not the default /
but from the /something-else
.
This because I want to place some other content inside the /
.
I've seen this similar question: How to set base url for Angular application but it didn't help me.
I would like to set that behavior for all the profiles: dev/prod/etc.
Upvotes: 1
Views: 590
Reputation: 21
I would recommend to use the Apache/Nginx to do this kind of configuration without changing jhipster context but you can do it like this:
First you need to add context-path
on you application.yml
:
server.servlet.context-path: /something-else/
Then you need to update the webpack.prod.js
or webpack.common.js
with the proper base attribute value. Considering jhipster as the context path, the base attribute value should looks like:
new HtmlWebpackPlugin({
...
base: '/something-else/'
})
See more information here
Upvotes: 1