Giter Site home page Giter Site logo

byte-camp's Introduction

学生选排课系统

项目模块说明

  1. api文件夹就是MVC框架的controller,负责协调各部件完成任务
  2. model文件夹负责数据库表实体
  3. service是MVC框架的Service层,负责处理业务逻辑
  4. cache负责redis缓存相关的代码
  5. common一些通用工具、错误状态码、常量等
  6. conf放一些静态存放的配置文件
  7. vo存放页面输入模型
  8. middleware存放gin相关中间件

抢课流程图

Image text

Godotenv

项目在启动的时候依赖以下环境变量,但是在也可以在项目根目录创建.env文件设置环境变量便于使用(建议开发环境使用)

MYSQL_DSN="db_user:db_password@/db_name?charset=utf8&parseTime=True&loc=Local" # Mysql连接地址
REDIS_ADDR="127.0.0.1:6379" # Redis端口和地址
REDIS_PW="" # Redis连接密码
REDIS_DB="" # Redis库从0到10
SESSION_SECRET="setOnProducation" # Seesion密钥,必须设置而且不要泄露
GIN_MODE="debug"

运行

go run main.go

项目运行后启动在3000端口(可以修改,参考gin文档)

byte-camp's People

Contributors

liwentaoch avatar

Stargazers

ccdxc avatar  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.