-
-
Save BrightnBubbly/c20d6244b8bb583f23c08c2d2d39271d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const initializeClient = async () => { | |
const {data} = await axios.post("api/generate_token",{name:'admin'}); | |
const client = new StreamChat(process.env.MIX_STREAM_API_KEY, { timeout: 6000 }); | |
await client.setUser({id: 'admin', name: 'Eze Sunday'}, data.token); | |
setClient(client); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment