Use the Bun environment.

This commit is contained in:
Dave Smith-Hayes 2024-10-23 22:32:15 -04:00
parent 727d251971
commit a83b2c3045
2 changed files with 2 additions and 3 deletions

View File

@ -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,
}
});

View File

@ -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);
}