- Written in Go
- Stores data in Gorm with PostgreSQL
git clone https://github.com/cenkayla/crud.git
cd crud
sudo docker-compose up -d
To list students:
curl 'localhost:8080/students'
Response:
[
{
"id": 1,
"name": "Cenk",
"age": 25
}
]
To create students:
curl -XPOST -d '{
"id":1,
"name":"Cenk",
"age": 25
}' 'localhost:8080/students'
Response:
Status:201 Created
To update students:
curl -XPUT -d '{
"id":1,
"name":"Deneme",
"age": 35
}' 'localhost:8080/students/1'
Response:
Status:200 OK
To delete students:
curl -XDELETE 'localhost:8080/students/1'
Response:
Status:200 OK