21 lines
343 B
Plaintext
21 lines
343 B
Plaintext
|
### 生成 requirements.txt
|
||
|
```shell
|
||
|
pip freeze > requirements.txt
|
||
|
```
|
||
|
|
||
|
### fastapi
|
||
|
```shell
|
||
|
pip install fastapi
|
||
|
pip install "uvicorn[standard]"
|
||
|
```
|
||
|
|
||
|
### 运行
|
||
|
```shell
|
||
|
# uvicorn [文件]:[fastapi 对象] --reload --port [端口号]
|
||
|
# uvicorn main:app --reload --port 5000
|
||
|
python main.py
|
||
|
```
|
||
|
|
||
|
### swagger 地址
|
||
|
> http://127.0.0.1:5000/docs
|