Rapide
is a simple backend project framework developed in Go, with features covering the most popular technology stacks. It's highly suitable for beginners looking to get started with learning.
Air
is a hot-reloading tool for Go. It can monitor changes to files or directories, automatically compile, and restart the program, thereby improving development efficiency. It requires Go version 1.16 or higher.
go install github.com/cosmtrek/air@latest
git clone https://github.com/yahahaff/rapide.git
cd rapide
go mod tidy
swag init
air
变量名 | 默认值 | 简介 |
---|---|---|
APP_ENV | debug | debug,test,release |
APP_PORT | 8000 | app port |
DB_DRIVER | sqlite | 数据库连接驱动器 支持mysql,sqlite |
DB_CONNECTION_HOST | localhost | mysql主机地址 |
DB_CONNECTION_PORT | 3306 | mysql数据库端口 |
DB_CONNECTION_USERNAME | root | mysql数据库用户 |
DB_CONNECTION_PASSWORD | password | mysql数据库密码 |
DB_CONNECTION_DATABASE | rapide | mysql数据库 |
DB_CONNECTION_FILE | database.db | sqlite db file |
REDIS_HOST | 8000 | redis host |
REDIS_PORT | 6379 | redis port |
LOG_PATH | rapide.log | 日志路径 |