This is a Golang Gin web frameworks template that provides a Django-like folder structure and command line tools for initializing projects and creating apps. It also includes some common and useful middleware that are set as default.
This project are made depeneds on following packages.
-
GormPostgresDriver (Optional)
Run following command to install the Golang Gin web framework template.
go install github.com/Zncl2222/gin-dj@latest
Or clone this project and run the following command in project's root directory
go install .
Use the command line tools to initialize project and create app like what django-admin and manage.py does.
Create project
gin-dj init example-project
Change directory to your project directory
cd example-project
Create custom app
gin-dj createapp example-app
example-project/
├── example-app/
| ├── models.go
| ├── serializers.go
| ├── urls.go
| ├── views.go
| ├── ...
├── core/
│ ├── settings.go
├── urls.go
└── main.go