From a83b2c30455a8f6325ec8b46c46b92e54cd7caee Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Wed, 23 Oct 2024 22:32:15 -0400 Subject: [PATCH] Use the Bun environment. --- chat-app/build.ts | 2 +- chat-app/frontend/websocket.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/chat-app/build.ts b/chat-app/build.ts index 914b7c6..ba4f5f8 100644 --- a/chat-app/build.ts +++ b/chat-app/build.ts @@ -15,7 +15,7 @@ async function main() { ...config, verbose: true, define: { - 'process.env.APP_URL': process.env.APP_URL, + 'Bun.env.APP_URL': Bun.env.APP_URL, } }); diff --git a/chat-app/frontend/websocket.js b/chat-app/frontend/websocket.js index d64d6f0..42c6bfe 100644 --- a/chat-app/frontend/websocket.js +++ b/chat-app/frontend/websocket.js @@ -1,6 +1,5 @@ export function createWebSocket() { - let appUrl = process.env.APP_URL; + let appUrl = Bun.env.APP_URL; appUrl = `//${appUrl}/chat-service`; - console.log(appUrl); return new WebSocket(appUrl); }