Skip to content

Latest commit

 

History

History
70 lines (37 loc) · 1.58 KB

README.md

File metadata and controls

70 lines (37 loc) · 1.58 KB

Gin Scaffold

Godoc Reference Build Status Coverage Status Go Report Card

Gin Scaffold is CLI to generate scaffolds for the gin framework. For now the project only supports mongodb and mgo as database.

Installation

go get github.com/dcu/gin-scaffold

Initializing a project

gin-scaffold init <project path>

Creating a model

gin-scaffold model <model name> <field name>:<field type>

Creating a controller

gin-scaffold controller <controller name>

Creating a scaffold

gin-scaffold scaffold <controller name> <field name>:<field type>

Running

go run <project name>.go

Accessing

Open browser, and access to http://localhost:4000. (Default port:4000)

RESTful

  • GET

List

curl 'http://localhost:4000/<controller name>

detail 1 by id

curl 'http://localhost:4000/<controller name>/<id>'

License

MIT

Author

David Cuadrado (dcu)