Running the application
You need a backend server for testing the UI because the UI fires REST APIs to get the data. You are going to use code from Chapter 6.
Go to the home directory of the Chapter 6 code. You can build the code by running gradlew clean build
from the root of the Chapter06
project and run the backend using the following command:
$ java -jar build/libs/Chapter06-0.0.1-SNAPSHOT.jar.
Make sure to use Java 17 in the path.
Once the backend is up and running, you can open another terminal and start the ecomm-ui
app by executing the following command from the Chapter07/ecomm
project root directory:
$ yarn start
If the application starts successfully, the UI will be accessible at http://localhost:3000
. You can open http://localhost:3000
in your favorite browser.
Once the product listing page loads, you can log in to the example e-commerce UI app with the username/password (scott/tiger
) and perform all the operations such as checkout, orders, and so on.