Go into directory
cd Chat Function
Insert connection String and endpoint
index.ts
const connectionString = 'HEEEEEEEEEERRRRRRRRRREEEEEEEEEE'
const endpoint = "HEEEEEEEEEERRRRRRRRRREEEEEEEEEE"
Run with F5
Go into directory
cd Chat App/chatapp
Install dependencies
npm i
Insert endpoint
App.tsx
const endpoint = "HEEEEEERRRRREEEEEEEEE";
Insert function URL
App.tsx
useEffect(() => {
fetch("HEEEEERRRREEEEE")
.then(response => response.json())
.then(data => {
setUser({
userId: data.user,
credential: new AzureCommunicationTokenCredential(data.userToken.token)
})
setThreadId(data.threadId)
});
},[])
Run
npm run start