Gin Scaffold
is CLI to generate scaffolds for the gin
framework.
For now the project only supports mongodb
and mgo
as database.
go get github.com/dcu/gin-scaffold
gin-scaffold init <project path>
gin-scaffold model <model name> <field name>:<field type>
gin-scaffold controller <controller name>
gin-scaffold scaffold <controller name> <field name>:<field type>
go run <project name>.go
Open browser, and access to http://localhost:4000. (Default port:4000)
- GET
curl 'http://localhost:4000/<controller name>
curl 'http://localhost:4000/<controller name>/<id>'
-
POST
curl -w '\n' 'http://localhost:4000/' --data '=' -XPOST
-
PUT
curl -XPUT 'http://localhost:4000//' -d '='
-
DELETE
curl -XDELETE 'http://localhost:4000//'
MIT
David Cuadrado (dcu)