feat: support load env variables from .env file

This commit is contained in:
JustSong
2024-06-23 15:37:11 +08:00
parent 114c44c6e7
commit 254b9777c0
6 changed files with 11 additions and 50 deletions

View File

@@ -340,6 +340,7 @@ graph LR
不加的话将会使用负载均衡的方式使用多个渠道。
### 环境变量
> One API 支持从 `.env` 文件中读取环境变量,请参照 `.env.example` 文件,使用时请将其重命名为 `.env`。
1. `REDIS_CONN_STRING`:设置之后将使用 Redis 作为缓存使用。
+ 例子:`REDIS_CONN_STRING=redis://default:redispw@localhost:49153`
+ 如果数据库访问延迟很低,没有必要启用 Redis启用后反而会出现数据滞后的问题。