Search code examples
javaangularjsjhipsteryo

first time using jHipster, browser hangs after grunt serve


I'm very familiar with yo angular (fullstack) apps, and so I expected the yo jhipster app scaffolding to perform in a similar way.

So, I'm running a new project using jhipster. I've installed everything, built my app with maven, created an entity, and started up the app with grunt serve

it just hangs forever.

enter image description here

So, popping open the developer console, i'm seeing that there are no JS errors, and the initial page's GET request is just pending forever.

enter image description here

Three questions immediately come to mind:

  1. what should I be seeing?
  2. is there a reason why the url wont resolve to anything?
  3. what do I do to load & view the app correctly?

Solution

  • I think you need to start up the server for backend (on a separate terminal window):

    • If using Maven: mvn spring-boot:run
    • If using Gradle: gradle bootRun

    If you check the Gruntfile.js in the root folder:

    browserSync: {
        dev: {
            bsFiles: {
                src : [
                    ...
                ]
            }
        },
        options: {
            watchTask: true,
            proxy: "localhost:8080"
        }
    },
    

    You find that the task browserSync is proxied to portal 8080, which is the server started by mvn spring-boot:run or gradle bootRun

    For your reference: http://jhipster.github.io/installation.html