Skip to content

Instantly share code, notes, and snippets.

@lukejoshuapark
Created August 15, 2022 02:32
Show Gist options
  • Save lukejoshuapark/8110ce3d8661dfcb9306e8bbc26ea044 to your computer and use it in GitHub Desktop.
Save lukejoshuapark/8110ce3d8661dfcb9306e8bbc26ea044 to your computer and use it in GitHub Desktop.
const res = await fetch("http://localhost:5007/auth", { method: "POST" });
const { connectionToken } = await res.json();
const url = `wss://ws.quicksocket.io?t=${connectionToken}`;
const webSocket = new WebSocket(url);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment