Skip to content

Commit

Permalink
feat: allow setting of hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
Creaous committed Dec 7, 2024
1 parent f79588b commit 581961a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Binary file modified bun.lockb
Binary file not shown.
6 changes: 4 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ export async function startServer() {
}
},
websocket: makeHandler({ schema, context: { pubsub } }),
port: isTestMode ? 25447 : process.env.PORT ?? 3000
port: isTestMode ? 25447 : process.env.PORT ?? 3000,
hostname: Bun.env.HOST || 'localhost',
development: !!(Bun.env.NODE_ENV === 'development') || isTestMode
});

// Connect to Redis.
Expand Down Expand Up @@ -122,7 +124,7 @@ export async function startServer() {
console.log('🔑 Authentication Server: Test Mode');
}
console.log(
`🚀 Serving HTTP at ${new URL(
`🌐 Serving HTTP at ${new URL(
yoga.graphqlEndpoint,
`http://${server.hostname}:${server.port}`
)}`
Expand Down

0 comments on commit 581961a

Please sign in to comment.