jHipster: Different versions on the 8080 and 9000 ports

harp1814 :

I executed "npm start" and "./mvnw" from my jHipster project folder on the different consoles.

Why contents on the http://localhost:9000 and http://localhost:8080 are different? http://localhost:8080 shows more old version of content.

admlz635 :

This happens when you do a prod build, it puts the frontend files on target folder and package all in a war/jar. When accessing on port 8080, you are fetching that packaged frontend inside the war/jar, while for port 9000, its proxying the stuff you started with npm start. Do a ./mvnw clean or simply remove target folder.

Also you can compile frontend to have that files updated.

When using Angular 2+ if you need to do a clean run with webpack compilation enabled for dev profile you can pass the webpack param as below

./mvnw -Pdev,webpack

This way you will have updated the served content on 8080 port.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=329575&siteId=1