docs: add react env docs

This commit is contained in:
lbaf23 2021-07-24 14:04:07 +08:00
parent 21b6ecd66b
commit 1b4e5447c9
1 changed files with 32 additions and 0 deletions

View File

@ -4,6 +4,8 @@ System of PBL.
## 开发
### 后端
新建开发配置文件
`vim conf/app-dev.conf`
@ -12,7 +14,20 @@ System of PBL.
`conf/app.conf`
### 前端
新建开发配置文件
`vim openpbl-landing/.env.development`
配置文件内容参考
`openpbl-landing/.env`
## 部署
### 后端 beego
新建部署配置文件
@ -41,5 +56,22 @@ clientId = # casdoor 应用 id
clientSecret = # casdoor 应用 secret
jwtSecret = # jwt 加密密钥
casdoorOrganization = "openct" # casdoor 应用所属组织
```
### 前端 react
新建部署配置文件
`vim openpbl-landing/.env.production`
配置文件内容参考
`openpbl-landing/.env`
```dotenv
REACT_APP_BASE_URL='http://localhost:5000/api'
REACT_APP_OSS_REGION: 'oss-cn-hangzhou' # 阿里云 oss region
REACT_APP_OSS_ACCESSKEYID: '123' # oss accesskeyId
REACT_APP_OSS_ACCESSKEYSECRET: '123' # oss accessKeySecret
REACT_APP_OSS_BUCKET: 'bucket' # oss bucket
```