Failed to get jhipster gateway home page

I cannot open the home page of My JHipster + Angular 2 (gateway) app with port 8080 (which is specified on the server port in app-dev.yml) There are no errors in the console.

index.html

Full load may be routing is not working properly.

The same app works fine on port 9000 (which is provided by yarn)

My problem is I am using port 9000 (given by yarn) unable to communicate with other microservice applications.

+3


source to share


3 answers


  1. Clear cache in your browser
  2. Run command    yarn run webpack: build


0


source


In developing:

  • start JHipster registry
  • on the gateway, run both mvnw

    and at the same time yarn start

    , and then open the application in a browser on port 9000, all service calls will be transparently proxied to Java applications: gateway + applications for microservices
  • run microservice apps with mvnw

EDIT:



I looked at your link, although I was hesitant because it was a 135MB archive !!! A few notes:

  • Next time please post the source on github instead of packing node_modules folders
  • agreeGatewayV1 uses mysql as dev database, making it difficult to start. h2 is much easier to work with, especially for a gateway where you don't intend to change the data schema.
  • App-2 does not contain a .yo-rc.json file, so I was unable to verify its configuration. The same as your gateway, it uses mysql in dev, so I couldn't test it.
  • Found 5 java crash messages in your archive, your environment seems to be very unstable. Maybe you should upgrade your OS and jvm, or maybe you are running out of RAM.

Sorry, but I cannot help you, it will take too long.

+4


source


You have to add the microservice path to the webpack dev server proxy context. If your microservice name my-microservice

, then add the line

'/my-microservice',

      

to file webpack.dev.js

to section devServer.proxy.context

. Note: in the gateway, if you create an interface for an object that is in a microservice, then the JHipster entity generator already adds this line.

+1


source







All Articles