78 lines
1.5 KiB
Markdown
78 lines
1.5 KiB
Markdown
|
|
##### 简要描述
|
|
|
|
- 打点上报接口
|
|
|
|
##### 请求URL
|
|
- ` http://taapi.legu.cc/v1/ `
|
|
##### 请求方式
|
|
- POST
|
|
|
|
##### 参数
|
|
|
|
| 参数名 | 必选 | 类型 | 说明 |
|
|
| :--------- | :--- | :--------- | -------------------------------------------------- |
|
|
| public | 是 | dict | 公共部分 |
|
|
| data | 是 | list[dict] | 记录列表 |
|
|
|
|
|
|
##### 请求示例
|
|
```shell
|
|
|
|
```
|
|
|
|
##### 返回示例
|
|
|
|
```
|
|
{
|
|
"code": 0,
|
|
"msg": "ok"
|
|
}
|
|
```
|
|
|
|
#### 项目结构
|
|
|
|

|
|
|
|
|
|
|
|
#### 项目部署
|
|
服务器 139.159.159.3
|
|
正式项目 /data/legu/pointapi
|
|
测试项目 /data/legu/ponitapi_test
|
|
|
|
|
|
#### 测试部署
|
|
supervisord 配置
|
|
/etc/supervisord.d/taapi.ini
|
|
```shell
|
|
[program:taapi_test]
|
|
command=pipenv run gunicorn main:app -b 0.0.0.0:6666 -w 16 -k uvicorn.workers.UvicornWorker
|
|
directory=/data/legu/ponitapi_test
|
|
autostart=true
|
|
startsecs=5
|
|
autorestart=true
|
|
timeout=200
|
|
stopasgroup=true
|
|
killasgroup=true
|
|
redirect_stderr=true
|
|
stdout_logfile_maxbytes=20MB
|
|
stdout_logfile_backups=20
|
|
stdout_logfile=/data/legu/ponitapi_test/log.log
|
|
|
|
```
|
|
nginx 配置
|
|
/etc/nginx/conf.d/taapi.legu.cc.conf
|
|
```shell
|
|
server {
|
|
listen 80;
|
|
server_name taapi.legu.cc;
|
|
|
|
location / {
|
|
proxy_set_header Host $host;
|
|
proxy_pass http://127.0.0.1:6666;
|
|
}
|
|
}
|
|
|
|
```
|