Coder Social home page Coder Social logo

gindemo's Introduction

Gin Demo例子

说明

用于对Gin框架的基础学习,整体合理框架架构搭建

项目依赖

go install

项目结构

gindemo
    ├───config   //配置
    ├───controllers  //控制器
    ├───db    //数据库操作
    ├───log    //日志存储
    ├───middlewares  //中间件
    ├───repositories //数据操作实体
    ├───schema   //相关实体定义
    ├───services  //服务相关
    └───utils  //工具

.env内容:

#mysql
MYSQL_HOST=
MYSQL_PORT=
MYSQL_USER=
MYSQL_PASSWORD=
MYSQL_DB=

#redis
REDIS_HOST=
REDIS_PORT=
REDIS_DB=
REDIS_PASSWORD=

需要在目录下创建env加载配置项

项目启动

推荐

docker-compose up -d

本地

go run main.go -p 8100

打包

docker build -t {服务}:{版本} .

gindemo's People

Contributors

gaoshengyue avatar

Watchers

 avatar

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.