Skip to content

Commit 1af3ef2

Browse files
authored
chore: add server port config (#56)
1 parent f9f4bc0 commit 1af3ef2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# 主URL配置
22
MAIN_URLS=
3+
# 服务端口配置
4+
SERVER_PORT=3000
35

46
# OneDrive配置
57
onedrive_uid=

src/basic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ app.use('*', serveStatic({root: 'public/'}))
4343

4444
serve({
4545
fetch: app.fetch,
46-
port: 3000,
46+
port: Number(process.env.SERVER_PORT) || 3000,
4747
})
4848

4949
export default app

0 commit comments

Comments
 (0)