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@latestOr 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-projectChange directory to your project directory
cd example-projectCreate custom app
gin-dj createapp example-appexample-project/
├── example-app/
| ├── models.go
| ├── serializers.go
| ├── urls.go
| ├── views.go
| ├── ...
├── core/
│ ├── settings.go
├── urls.go
└── main.go