Git Product home page Git Product logo

gboot's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.