1

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.

gixlg
  • 1,193
  • 1
  • 9
  • 21
  • 1
    Does this answer your question? [How set up a Context Path on a Jhipster (spring boot + angular) application](https://stackoverflow.com/questions/59843787/how-set-up-a-context-path-on-a-jhipster-spring-boot-angular-application) – JoSSte Mar 15 '21 at 21:52

1 Answers1

1

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

Dmitry S.
  • 1,544
  • 2
  • 13
  • 22
elfelli
  • 21
  • 4