Skip to content

Commit

Permalink
add:.env
Browse files Browse the repository at this point in the history
  • Loading branch information
kongxiangyiren committed Jan 4, 2024
1 parent 6c54b58 commit 90a4f70
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions src/server/pkg/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# twikoo 配置

# MongoDB 数据库连接字符串,不传则使用 lokijs
MONGODB_URI=

# MongoDB 数据库连接字符串,不传则使用 lokijs
MONGO_URL=

# lokijs 数据库存储路径
TWIKOO_DATA= './data'

# 端口号
TWIKOO_PORT=8080

# IP 请求限流,当同一 IP 短时间内请求次数超过阈值将对该 IP 返回错误
TWIKOO_THROTTLE=250

# 为true时只监听本地请求,使得 nginx 等服务器反代之后不暴露原始端口
TWIKOO_LOCALHOST_ONLY=

# 日志级别,支持 verbose / info / warn / error
TWIKOO_LOG_LEVEL=info

# 在一些特殊情况下使用,如使用了CloudFlare CDN 它会将请求 IP 写到请求头的 cf-connecting-ip 字段上,为了能够正确的获取请求 IP 你可以写成 ['headers.cf-connecting-ip']
TWIKOO_IP_HEADERS=[]
2 changes: 1 addition & 1 deletion src/server/pkg/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ node_modules
.DS_Store
dist
data

!.env

/cypress/videos/
/cypress/screenshots/
Expand Down

0 comments on commit 90a4f70

Please sign in to comment.