Starting the application

Now, let's start the application and see the output. There are multiple ways to run the application:

Let's start the application using the Gradle task. If you want to run the application directly in the IDE, just open the main app file StoreApp.java mentioned earlier, right-click, and choose Run 'StoreApp'.

To start the application via Gradle, open a terminal/command line and navigate to the application folder. Then, execute the Gradle command as follows (if you are on windows, execute gradlew.bat). This will trigger the default task bootRun:

> cd online-store
> ./gradlew
Running ./gradlew is equivalent to running ./gradlew bootRun -Pdev. For the client side, the webpack build needs to be run before starting the server for the first time, otherwise you will see a blank page. This task is run automatically during the app generation, but if it fails for some reason, it can be triggered manually by running yarn run webpack:build. The task can be triggered directly by the Gradle command as well by running ./gradlew webpackBuildDev bootRun -Pdev.

Gradle will start downloading the wrapper and dependencies, and you should see the console output similar to the following screenshot after some time (anywhere from a few seconds to a few minutes depending on network speed):

The app has started successfully and is available on http://localhost:8080. Open your favorite browser and navigate to the URL.

Note that the build preceding will stay at 90% as the process is running continuously.