Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahaostudy/douyin
青训营项目 —— 抖音极简版
https://github.com/ahaostudy/douyin
douyin ffmpeg gin go golang gorm mysql rabbitmq redis tiktok web
Last synced: about 1 month ago
JSON representation
青训营项目 —— 抖音极简版
- Host: GitHub
- URL: https://github.com/ahaostudy/douyin
- Owner: ahaostudy
- Created: 2023-08-25T05:56:52.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-08-31T10:34:26.000Z (over 1 year ago)
- Last Synced: 2024-06-21T19:53:19.592Z (6 months ago)
- Topics: douyin, ffmpeg, gin, go, golang, gorm, mysql, rabbitmq, redis, tiktok, web
- Language: Go
- Homepage:
- Size: 44.5 MB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 字节青训营 —— 抖音极简版
## 目录
- [项目环境](#项目环境)
- [安装FFmpeg](#安装FFmpeg)
- [配置MySQL](#配置MySQL)
- [Redis与RabbitMQ](#Redis与RabbitMQ)
- [项目启动](#项目启动)
- [clone并进入项目](#clone并进入项目)
- [编辑配置文件](#编辑配置文件)
- [同步项目依赖](#同步项目依赖)
- [启动项目](#启动项目)## 项目环境
- Golang 1.20
- MySQL
- Redis
- RabbitMQ
- FFmpeg### 安装FFmpeg
下载并解压 [ffmpeg-master-latest-win64-gpl.zip](https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip)
,将解压后的 `bin` 目录添加到环境变量即可。### 配置MySQL
本项目运行需要将`sql_mode`中的`ONLY_FULL_GROUP_BY`删掉。
先登录MySQL,查询`sql_mode`
```mysql
SELECT @@global.sql_mode;
``````text
+---------------------------------------------------------------+
| @@global.sql_mode |
+---------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION |
+---------------------------------------------------------------+
```删除结果中的 ONLY_FULL_GROUP_BY
```mysql
SET GLOBAL sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION';
```### Redis与RabbitMQ
自行安装
## 项目启动
### clone并进入项目
```shell
git clone [email protected]:loau/douyin.git
cd douyin
```### 编辑配置文件
将 `config.bak.yaml` 复制为 `config.yaml`,并在 `config.yaml` 中根据需要修改配置。
```shell
cp config/config.bak.yaml config/config.yaml
vim config/config.yaml
```### 同步项目依赖
```shell
go mod init main
go mod tidy
```### 启动项目
```shell
go run main.go
```