Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
leafmoes authored Nov 6, 2024
1 parent 97c2be0 commit f635dcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit f635dcf

Please sign in to comment.