To run this app
- Clone the repository and open book-app-server folder in your Spring Tool Suite
- Make sure MySQL is running in your system
- Next go to this src/main/resources/application.properties file and change your database name, username and password
- Once completed, run the spring boot app in Spring Tool Suite or run the cmd "mvn spring-boot:run"
- To run the react app, go the location book-app-client and enter the command "npm install && npm start"
- Then go to http://localhost:3000/ you will get the page.
Response
{ "id": 100, "title": "Spring microservice in action", "author": "john carnell", "coverPhotoURL": "iuiuyolkhk", "isbnNumber": 7987709099090, "price": 3222, "language": "English" }
- POST - http://localhost:8080/api/v1/books Header Content-Type - application/json
input
{ "id": 101, "title": "Spring in action", "author": "john carnell", "coverPhotoURL": "iuiuyolkhk", "isbnNumber": 7987709099090, "price": 3200, "language": "English" }
Response
[ { "id": 100, "title": "Spring microservice in action", "author": "john carnell", "coverPhotoURL": "iuiuyolkhk", "isbnNumber": 7987709099090, "price": 3222, "language": "English" }, { "id": 101, "title": "Spring microservice in action", "author": "john carnell", "coverPhotoURL": "iuiuyolkhk", "isbnNumber": 7987709099090, "price": 3222, "language": "English" }, { "id": 102, "title": "Spring in action", "author": "john carnell", "coverPhotoURL": "iuiuyolkhk", "isbnNumber": 7987709099090, "price": 3200, "language": "English" } ]
input
{ "id": 102, "title": "Apache Kafka", "author": "john carnell", "coverPhotoURL": "iuiuyolkhk", "isbnNumber": 7987709099090, "price": 1000.00, "language": "English" }
- DELETE - http://localhost:8080/api/v1/books/