From f635dcf303fa9a0edb88c61984b50967055b9e11 Mon Sep 17 00:00:00 2001 From: leafmoes <44945631+leafmoes@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:24:30 +0800 Subject: [PATCH] Update index.js --- api/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/index.js b/api/index.js index c6e2ab1..bf522ab 100644 --- a/api/index.js +++ b/api/index.js @@ -7,7 +7,7 @@ dotenv.config() class Config { constructor() { - this.PORT = process.env.PORT || '/' + this.PORT = process.env.PORT || '8787' this.API_PREFIX = process.env.API_PREFIX || '/' this.API_KEY = process.env.API_KEY || '' this.MAX_RETRY_COUNT = process.env.MAX_RETRY_COUNT || 3 @@ -320,9 +320,9 @@ function newChatCompletionWithModel(text, model) { if (typeof addEventListener === 'function') return // For Nodejs const ittyServer = createServerAdapter(router.fetch) - console.log(`Listening on http://localhost:${config.PORT || 8787}`) + console.log(`Listening on http://localhost:${config.PORT}`) const httpServer = createServer(ittyServer) - httpServer.listen(config.PORT || 8787) + httpServer.listen(config.PORT) })() // export default router