nanospeck
nanospeck

Reputation: 3548

Why JHipster has 2 different server urls for maven and gulp ? Which one should I use?

I'm trying to checkout and run a jhipster application created by someone else to continue development.

Terminal 1 : I ran the command for 'mvn'

mvn

Now, the application is availabe at :

http://localhost:8181/#/

Terminal 2 : I ran the command for gulp

gulp

No, the application is available also at :

http://localhost:9000/#/

What is the point of this? The jhipster docs ask me to run both these commands. Are these 2 different servers e.g. ( 1 tomcat, 1 jetty) ? How did the front end work well when I ran 'mvn' command? Is the 'gulp' only to help with browser sync? Which one should I use?

Upvotes: 1

Views: 252

Answers (1)

Gaël Marziou
Gaël Marziou

Reputation: 16284

You should run both when you're working on the angular part of the app.

Port 9000 is for gulp serve (so a nodejs server, not tomcat nor jetty) for browser-sync and it serves only static files (js, css, html) and watch them for changes to enable hot reloading. It also proxifies all calls to web API from port 9000 to spring-boot server on port 8080. This is why your browser must use port 9000.

Of course, this is only for development. In production you run only the spring-boot app.

Upvotes: 1

Related Questions