Commit 571c5161 by 周田

doc:更新 readme

parent 63366439
......@@ -23,15 +23,65 @@
## 安装依赖
1. 在 conda 创建的虚拟环境中下载 poetry
```
pip install poetry
```
2. 使用 poetry 命令下载依赖
```
poetry install
```
1. 创建 conda 的虚拟环境
```
conda create -n django-venv python=3.9.16
```
2. 激活 django-venv 虚拟环境
```
conda activate django-venv
```
可以使用 pip list 查看是否为一个新的环境
3. 激活虚拟环境后下载 poetry
```
pip install poetry
```
4. 使用 poetry 命令下载依赖
```
poetry install
```
5. 转到 frontend 文件夹,下载前端的依赖(node 版本最低为16,我这里使用的是 16.20.1)
```
yarn install
```
```
npm install
```
6. 下载完依赖之后打包项目
```
yarn build
```
```
npm run build
```
7. 退回到 vue_django_test 文件夹,启动项目,就能正常看见页面了
```
python manage.py runserver
```
ps:以上步骤在 windows 环境和 ubuntu 20.04 下都测试过,都能正常跑起来
## 运行项目
使用 `python manage.py runserver` 运行项目(目前运行项目只有接口,可能只能通过接口调试工具来测试)
![1692841750241](image/README/1692841750241.png)
## 注意
* 如果是在远程的情况下,需要将 vue_django 目录中 urls.py 文件中的 `mqtt``chat` url 给注释了,否则启动不成功
* ![1692841883700](image/README/1692841883700.png)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment