Freddy92
Freddy92

Reputation: 65

JHipster 4.5.2 - blank page

I have an application generated with the JHipster 4.5.2 version and I would like to launch it on a server (jboss or Tomcat) but I got a blank page (because the server side only is launched from what I understand) When I launch mvnw and yarn start in the Command Prompt it works. How to launch the app in a server with client and server side working ? Hope you understand my problem. Thanks for your help.

edit : (got no errors when compiling. I'm using prod profile)

Jboss logs : `22:54:59,433 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:54:59.431 INFO 5920 --- [read Pool -- 72] c.j.x.ApplicationWebXml : Starting ApplicationWebXml on Fred with PID 5920 (started by Freddy in D:\jboss-eap-6.4.7\bin)

22:54:59,453 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:54:59.452 DEBUG 5920 --- [read Pool -- 72] c.j.x.ApplicationWebXml : Running with Spring Boot v1.5.2.RELEASE, Spring v4.3.7.RELEASE

22:54:59,454 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:54:59.453 INFO 5920 --- [read Pool -- 72] c.j.x.ApplicationWebXml : The following profiles are active: swagger,no-liquibase,dev

22:55:02,873 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:02.873 DEBUG 5920 --- [read Pool -- 72] c.j.x.config.AsyncConfiguration : Creating Async Task Executor

22:55:04,400 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:04.400 DEBUG 5920 --- [read Pool -- 72] c.j.x.config.MetricsConfiguration : Registering JVM gauges

22:55:04,432 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:04.432 DEBUG 5920 --- [read Pool -- 72] c.j.x.config.MetricsConfiguration : Monitoring the datasource

22:55:04,446 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:04.446 DEBUG 5920 --- [read Pool -- 72] c.j.x.config.MetricsConfiguration : Initializing Metrics JMX reporting

22:55:05,517 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:05.516 DEBUG 5920 --- [read Pool -- 72] c.j.x.config.WebConfigurer : Registering CORS filter

22:55:05,934 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:05.932 INFO 5920 --- [read Pool -- 72] c.j.x.config.WebConfigurer : Web application configuration, using profiles: swagger

22:55:05,934 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:05.934 DEBUG 5920 --- [read Pool -- 72] c.j.x.config.WebConfigurer : Initializing Metrics registries

22:55:05,949 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:05.948 DEBUG 5920 --- [read Pool -- 72] c.j.x.config.WebConfigurer : Registering Metrics Filter

22:55:05,950 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:05.950 DEBUG 5920 --- [read Pool -- 72] c.j.x.config.WebConfigurer : Registering Metrics Servlet

22:55:05,962 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:05.962 INFO 5920 --- [read Pool -- 72] c.j.x.config.WebConfigurer : Web application fully configured

22:55:06,379 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:06.379 DEBUG 5920 --- [read Pool -- 72] i.g.j.c.liquibase.AsyncSpringLiquibase : Liquibase is disabled

22:55:12,402 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:12.401 DEBUG 5920 --- [read Pool -- 72] c.j.x.config.social.SocialConfiguration : Configuring GoogleConnectionFactory

22:55:12,424 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:12.423 DEBUG 5920 --- [read Pool -- 72] c.j.x.config.social.SocialConfiguration : Configuring FacebookConnectionFactory

22:55:12,448 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:12.448 DEBUG 5920 --- [read Pool -- 72] c.j.x.config.social.SocialConfiguration : Configuring TwitterConnectionFactory

22:55:17,814 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:17.813 DEBUG 5920 --- [read Pool -- 72] i.g.j.c.apidoc.SwaggerConfiguration : Starting Swagger

22:55:17,953 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:17.953 DEBUG 5920 --- [read Pool -- 72] i.g.j.c.apidoc.SwaggerConfiguration : Started Swagger in 9 ms

22:55:19,382 INFO [stdout] (ServerService Thread Pool -- 72) 2017-06-03 22:55:19.381 INFO 5920 --- [read Pool -- 72] c.j.x.ApplicationWebXml : Started ApplicationWebXml in 23.086 seconds (JVM running for 56.264)`

Upvotes: 0

Views: 348

Answers (1)

Jon Ruddell
Jon Ruddell

Reputation: 6362

To deploy an Angular app under a context-path, you need to update the default base href in index.html. Inside the HTML <head> tag, change:

<base href="/" />

to

<base href="./" />

This will load resources from any context-path instead of expecting them to be under the root / path.

Upvotes: 2

Related Questions