@codesoup/chat-client
v0.0.5
Published
Add a chat client to your app
Downloads
2
Readme
Chat Client
Add a chat client to your app
Dependencies
- socket.io-client
Installation
# in your app directory
npm install svelte-demo-chat-client socket.io-client
How to use
- Import the ChatClient in your app
- Supply an endpoint and an auth string (if using)
<script>
import { ChatClient } from "svelte-demo-chat-client.svelte";
# supply an endpoint, and optional authentication
const endpoint = "http://urlofyoursocketioserver";
const auth ="my_auth_string";
...
</script>
<body>
<ChatClient endpoint={endpoint} auth={auth} />
...