Skip to content

Commit

Permalink
fix: ws url logic error
Browse files Browse the repository at this point in the history
  • Loading branch information
cs50victor committed Feb 21, 2024
1 parent 83e70bd commit 7c3dcb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demo/components/WebSocketExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface ServerWSResponse {
}

export default function WebSocketExample({port = 8080}:{port?:number}){
const server_ws_url = process.env.NODE_ENV === "production" ? `ws://localhost:${port}` : "ws://new-media.fly.dev"
const server_ws_url = process.env.NODE_ENV != "production" ? `ws://localhost:${port}` : "wss://new-media.fly.dev"
const [imgMetadata, setImageMetadata] = useState<ServerWSResponse>();
const [socket, setSocket] = useState<WebSocket>()

Expand Down

0 comments on commit 7c3dcb0

Please sign in to comment.