gomall

command module
v0.0.0-...-22b531f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 2 Imported by: 0

README

Go Gin Boilerplate

🎬 Introduction

A development boilerplate based on the Gin framework, aimed at helping developers quickly build and develop web applications.

👀 Keywords

Go Gin Cobra Viper Gorm Gin-Swagger Air Logrus Lumberjack Zap Jwt

✨ Features

  • Fast Development: Using the Gin framework and related tools to speed up the development and iteration process of the project..
  • Easy to use: Follow the project-layout specification and provide a clear and simple code structure so that even beginners can easily get started.
  • Advanced CLI: Using Cobra to build modern command line tools to simplify project management and operations.
  • Hot Reload: Using Air tool, support hot reload, improve development efficiency.
  • Logging system: Integrated Logrus, Zap and Lumberjack to achieve all-round log recording and management.
  • Database Support: Integrated Gorm, support mainstream databases such as MySQL, PostgreSQL, etc.
  • Flexible Middleware: Integrate common middleware to easily implement functions such as logging, authentication, cross-domain, and flow control.
  • API Document: Use Gin-Swagger to generate API documents for easy viewing and debugging of interfaces.

🚀 Quick Start

git clone https://github.com/Xuduoteng/gomall.git
cd gomall
go mod download
Configuration Setup
  • Navigate to the configs directory, copy the config.example.yaml file, and rename it to config.yaml.
cp configs/config.example.yaml configs/config.yaml
  • Modify the configuration items in the config.yaml file.
vi configs/config.yaml
Run the Application
  • Run the project using air 【Recommended】
air
  • Run the project using go run
go run main.go server

🔨 Build

make build

🪤 Deployment

docker-compose

Deploy the application using docker-compose. Ensure that Docker is installed on the server, and you are familiar with the usage of docker compose.

  • Copy the deployments/docker-compose.yml configuration file to the project root directory.
  • Execute the following command to start the application
docker compose up -d

🤝 Support

  • Star 🌟 the project

  • Welcome to submit issue. Thank you for your support

  • Help promote it on social media and recommend it to friends

    Twitter Facebook WhatsApp Telegram

  • You can also sponsor a cup of coffee on Ko-Fi or Buy Me A Coffee

    Buy Me a Coffee at ko-fi.com Buy Me A Coffee

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
swagger
Package swagger Code generated by swaggo/swag.
Package swagger Code generated by swaggo/swag.
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL