fix domain url

This commit is contained in:
Jeff Emmett 2024-12-08 23:14:22 -05:00
parent 5858775483
commit bf5b3239dd
3 changed files with 15 additions and 6 deletions

View File

@ -51,16 +51,18 @@ export default function InteractiveShapeExample() {
function App() { function App() {
if (process.env.NODE_ENV === "production") { if (process.env.NODE_ENV === "production") {
// Disable all console logs in production // Comment out console.log override temporarily for debugging
console.log = () => {} // console.log = () => {}
console.debug = () => {} // console.debug = () => {}
console.info = () => {} // console.info = () => {}
// Keep error and warn for debugging // Keep error and warn for debugging
// console.error = () => {}; // console.error = () => {};
// console.warn = () => {}; // console.warn = () => {};
} }
// Add a debug message to verify console logging is working
console.log("App initialized, NODE_ENV:", process.env.NODE_ENV)
return ( return (
<BrowserRouter> <BrowserRouter>
<Routes> <Routes>

View File

@ -89,6 +89,12 @@ export class VideoChatShape extends BaseBoxShapeUtil<IVideoChatShape> {
} }
async ensureRoomExists(shape: IVideoChatShape) { async ensureRoomExists(shape: IVideoChatShape) {
console.log("Environment variables:", {
NODE_ENV: process.env.NODE_ENV,
allEnvVars: import.meta.env,
dailyApiKey: import.meta.env.VITE_DAILY_API_KEY,
})
if (shape.props.roomUrl !== null) { if (shape.props.roomUrl !== null) {
return return
} }
@ -101,6 +107,7 @@ export class VideoChatShape extends BaseBoxShapeUtil<IVideoChatShape> {
"API Key format:", "API Key format:",
apiKey?.substring(0, 4) === "key_" ? "correct" : "incorrect", apiKey?.substring(0, 4) === "key_" ? "correct" : "incorrect",
) )
console.log("Available env vars:", import.meta.env)
if (!apiKey) { if (!apiKey) {
throw new Error("Daily API key is missing") throw new Error("Daily API key is missing")

View File

@ -23,7 +23,7 @@ export default defineConfig({
process.env.VITE_WORKER_URL, process.env.VITE_WORKER_URL,
), ),
"import.meta.env.VITE_DAILY_DOMAIN": JSON.stringify( "import.meta.env.VITE_DAILY_DOMAIN": JSON.stringify(
"https://pc-bcedd8ead7044c64902f3c18973485b4.daily.co", "https://mycopunks.daily.co",
), ),
"import.meta.env.VITE_DAILY_API_KEY": JSON.stringify( "import.meta.env.VITE_DAILY_API_KEY": JSON.stringify(
process.env.VITE_DAILY_API_KEY, process.env.VITE_DAILY_API_KEY,