Skip to content

πŸš€πŸš€πŸš€ Start a web project right away using gonic-gin/gin and other practical tools!!! πŸš€πŸš€πŸš€

License

Notifications You must be signed in to change notification settings

gin-melodic/gboot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

gboot

Go

πŸš€πŸš€πŸš€ Start a web project right away using gonic-gin/gin and other practical tools!!! πŸš€πŸš€πŸš€

Use this framework to easily launch a Golang web service with the following features:

Install & Usage

Before All

  1. Install golang and configure golang environment.
  2. Create a project folder by mkdir myApp
  3. cd myApp

One-Click Script

In your project root directory and run:

wget https://raw.githubusercontent.com/gin-melodic/gboot/main/install.sh && bash install.sh && rm install.sh

Since the script needs to be an interactive shell, it cannot be executed using the previous wget -qO- with pipeline

The script will provide options that dynamically affect the code that creates the item.

These options are:

  1. project name Get the name of the current folder as the project name by default.
  2. author name The default value anonymous is actually meaningless and is highly recommended to be changed. One suggestion is to use your github username, which together with project name will form project address on github like https://github.com/<author>/<project>.
  3. use one-click installation If this option is Y, then all subsequent questions will be skipped and the created project will use 8000 as the listening port, './log/' as the directory for the log files, the log file rotation is set to 7 days, and the script will generate sample code for connecting to the database.
  4. project port Set the service listening port in the configuration file.
  5. log save path Set the log files saving path in the configuration file.
  6. log overwrite days Set the log file rotation time in the configuration file.
  7. database demo code If this option is Y, the script will generate sample code for connecting to the database. It's worth noting that the generated database connection initialisation code uses a glogger I wrote as the SQL execution print handle, which is particularly nice to have when Debugging.

In addition to the service code itself, the script generates a powerful Makefile for compiling and packaging the service. You can add more customisation to this makefile.

Demo video

gboot-demo.mp4

About

πŸš€πŸš€πŸš€ Start a web project right away using gonic-gin/gin and other practical tools!!! πŸš€πŸš€πŸš€

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published