Skip to content

steleow/simple-crud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

Please follow the steps:

Start the mockup API server

npm install -g json-server
json-server --watch db.json

Start springboot application

./mvnw spring-boot:run

Available APIs

  • get all students
curl --request GET 'https://localhost:8080/students'
  • get student by id
curl --request GET 'https://localhost:8080/students/1'
  • create new student
curl --request POST 'https://localhost:8080/students'
--header 'Content-Type: application/json'
-d '{
      "id": 6,
      "name": "Leon Leong",
      "age": 17,
      "address": {
        "street": "Taman Bukit Bendera",
        "city": "Mentakab",
        "postcode": "28400"
      },
      "course": "Accountant"
    }'
  • update existing student by id
curl --request PUT 'https://localhost:8080/students/6'
--header 'Content-Type: application/json'
-d '{
      "id": 6,
      "name": "Leon Leong cin cin",
      "age": 17,
      "address": {
        "street": "Taman Bukit Bendera",
        "city": "Mentakab",
        "postcode": "28400"
      },
      "course": "Accountant"
    }'
  • delete student by id
curl --request DELETE 'https://localhost:8080/students/6'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages