初始化提交
This commit is contained in:
30
mengyalinkfly-backend/README.md
Normal file
30
mengyalinkfly-backend/README.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# 萌芽短链接分发系统 - 后端
|
||||
|
||||
## 功能说明
|
||||
|
||||
- 生成4位随机字母数字组合的短链接(支持大小写)
|
||||
- 检查短链接是否已被使用
|
||||
- 创建和保存短链接
|
||||
- 重定向到目标URL
|
||||
|
||||
## 安装依赖
|
||||
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## 运行
|
||||
|
||||
```bash
|
||||
python app.py
|
||||
```
|
||||
|
||||
服务将在 `http://localhost:5000` 启动
|
||||
|
||||
## API 接口
|
||||
|
||||
- `GET /api/check/<code>` - 检查短链接是否可用
|
||||
- `GET /api/generate` - 生成随机可用短链接
|
||||
- `POST /api/create` - 创建短链接
|
||||
- `GET /<code>` - 跳转到目标链接
|
||||
- `GET /api/links` - 获取所有链接列表
|
||||
Reference in New Issue
Block a user