go-crud

module
v0.0.0-...-1c54703 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2022 License: Unlicense

README

go-crud

Sample crud with gin and gorm

How to run the application

  1. On linux just go into the app directory cmd/go-crud
  2. Run like this ./go-crud
Insert:
curl -X POST localhost:3000/api/posts -H 'Content-Type: application/json' -d '{"Title":"newtitle","Body":"newbody"}'
Update:
curl -X POST localhost:3000/api/posts/1 -H 'Content-Type: application/json' -d '{"Title":"updatetitle","Body":"updatebody"}'
Delete:
curl -X DELETE localhost:3000/api/posts/1
Get One:
curl localhost:3000/api/posts/1
Get All:
curl localhost:3000/api/posts

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL