This template should help get you started developing with Golang
Current Project is Based on Gorm and Gin-Gonic
Clone project and run
go get
go install "github.com/usama-tariq1/leet-astro@latest"
Test Cli
leet-astro
leet-astro init ProjectName "ModUser"
example
leet-astro init Test "github.com/usama-tariq1"
assuming go 1.18 or greater is already installed on system
go get
copy .env.example and make .env file fill in Database configs
This will also create migrations in database if tables are not already created
leet-astro serve
go run main.go
note that project does not support hot reload
With Resource and methods already built
leet-astro create controller ControllerName --model=ModelName
With out methods
leet-astro create controller ControllerName
create just model with query methods
leet-astro create model ModalName
With controller auto generated
leet-astro create model Name --controller=true
With controller and router auto generated
leet-astro create model Name --controller=true --router=true
leet-astro create router NameRouter
leet-astro create middleware Name
Gin-Gonic Docs.
GORM Docs.