An app showcasing the usage of Chat SDK with Chat React hooks to build chat.
Quickstart install-to-browser, from this folder run:
(cd .. && npm run build)
npm install
npm run start
[!NOTE] This demo app uses both the
ably-chat-js
core SDK and associated React hooks. The latter is accessible via@ably/chat/react
once the@ably/chat
package has been installed.
- First of all, you need to build the main Chat SDK and associated React hooks from the root directory (
(cd .. && npm run build)
). - Run
npm install
here.
- Copy
.env.example
to.env.
and set theVITE_ABLY_CHAT_API_KEY
to your Ably API key. - If you're using a custom Ably domain, also set the
VITE_ABLY_HOST
to your custom domain.
For Ably: if running local realtime, see src/main.tsx
.
Run npm run start
, and it will automatically open your browser on port 8888.
Use npm run start-silent
if you'd rather not have your browser open automatically.
npm run start
(and the start-silent
version) will run both the API component for generating tokens and the front-end side. If you'd like to only run the front-end site use npm run dev
.