This repository contains an example of a web application based on a RESTful API with Spring Boot (
api/) and a single page application with Vue.js v3 (frontend/). Please refer to theREADME.mdfiles in the respective folders for concrete instructions.
- Clone this repository.
- Follow the api/README.md instructions in the
/apifolder to install the prerequisites for the backend. - Follow the frontend/README.md instructions in the
/frontendfolder to install the prerequisites the frontend. - Start the API by navigating into its folder and executing
./mvnw spring-boot:run
- Now start the frontend by navigating into its folder and executing
npm installnpm run dev
Assuming all prerequisites are fulfilled, you can follow these instructions to get to know the application:
- Open http://localhost:8080/api/v1/cats in your browser. It will show all available cats in the system.
- Open http://localhost:8080/api/v1/cats/1 in your browser. It will show the cat with ID
1. - Open http://localhost:8080/api/v1/cats/42 in your browser. It will show a
404 Not founderror because there is no cat with ID42in the system.
- It will host the UI at http://localhost:5173, which you can now also open in your browser.
- Navigate to the cats view by clicking on the respective menu item or via the direct ULR http://localhost:5173/#/cats.
- Delete a cat. Then confirm its deletion via the API by opening http://localhost:8080/api/v1/cats in your browser again.