edkeveked
edkeveked

Reputation: 18371

Change port 8080 for jhipster app

I have already specified port 8080 for my jhipster apps during the initialization of the apps at the beginning when creating them with yo jhipster.

Now, I would like to know how I can change the port 8080 so I can run several apps at the same time.

Upvotes: 5

Views: 7763

Answers (4)

Aziz Abdennebi
Aziz Abdennebi

Reputation: 1

in .yo-rc.json file, change serverPort property "serverPort": "8081", then run jhipster --with-entities

Upvotes: 0

If can do it manual, you change 3 files

  • application-*.yml : the server port
  • proxy.conf.json
  • webpack.dev.js

If you use docker for deploiement, you must change file in doker folder.

Upvotes: 0

Gel
Gel

Reputation: 3026

Im using visual code, with minimal added code from jhipster generated code. Using jhipster monolithic app (although I have done it with micorservices as well).

I just do command + shift + F to search for all instance of 8080. This helps you search all your files for this instance.

Then chose all the ones with yml files yo-rc.json, serverPorts, procy.conf.json, docker files, webpackdev etc... that pertains to port 8080 and change them to 8181 or other port number.

Hope this helps as well.

Upvotes: 1

Gaël Marziou
Gaël Marziou

Reputation: 16284

2 alternatives:

  • Edit .yo-rc.json file, change or add serverPort property like "serverPort": "8100", then re-generate your app with jhipster --with-entities if you did not make many changes or use jhipster upgrade --force if you did.
  • Change port value in application*.yml files and proxy.conf.json,and probably also in some docker files

Upvotes: 20

Related Questions