Sample crud with gin and gorm
- On linux just go into the app directory cmd/go-crud
- Run like this ./go-crud
curl -X POST localhost:3000/api/posts -H 'Content-Type: application/json' -d '{"Title":"newtitle","Body":"newbody"}'
curl -X POST localhost:3000/api/posts/1 -H 'Content-Type: application/json' -d '{"Title":"updatetitle","Body":"updatebody"}'
curl -X DELETE localhost:3000/api/posts/1
curl localhost:3000/api/posts/1
curl localhost:3000/api/posts