Application generated with JHipster 4 returning blank page on 8080, but not on 9000

这一生的挚爱 提交于 2019-12-18 11:27:22

问题


I've create an application with JHipster v4. When I make a request on port 8080 it is returning a blank page. If I use yarn start, and I make a request to 9000 port, it is answering correctly.

Any idea?


回答1:


I had the same issue with JHipster application bringing up the blank page on port 8080 when ran with ./mvnw in dev mode. I was able to resolve this by running:

yarn install && yarn webpack:build

After it finishes, the application shows normally in dev mode on port 8080.




回答2:


I had the same issue where on port 8080, it was returning nothing and on 9000 it gave correct page , after yarn install && yarn webpack:build I get correct page on both, I noticed that if I only run .mvnw, the application runs fine and I do not need to run "yarn start"




回答3:


By default, yarn listens on port 9000 (webpack + browser sync) to hot reload frontend code and contents, maven or gradle listens on port 8080 to hot reload server code. You must run both in dev.

If you start making changes to the client side code without having yarn start running, nothing will be reflected as the changes are not compiled so you need to either run yarn webpack:build manually after changes or have yarn start running.

It's written in the README.md of the project you generated and is documented on JHipster web site.




回答4:


You should run npm install then mvnw, and it will run good.




回答5:


For me (using npm for the front-end), just running npm start before mvnw makes the front-end available on 8080. On the other hand, running npm start after mvnw will bring a blank page on 8080.



来源:https://stackoverflow.com/questions/42062717/application-generated-with-jhipster-4-returning-blank-page-on-8080-but-not-on-9

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!