Clone this repository or download it as a ZIP
curl https://codeload.github.com/rapid-io/demo-javascript-chat/tar.gz/master | tar -xz
cd demo-javascript-chat-master
Visit http://www.rapid.io and create a FREE account. You'll be redirected into Rapid.io Dashboard, where you can find a demo project. Within a Setting tab, you'll find an API key. Copy the key into clipboard, find lib/rapid.js
file and paste the key to the following constant.
const API_KEY = ''
Install it and run.
yarn
yarn run dev
In the dashboard, you can observe channels
collection, that contains documents with channels of your chat app.
You can also look for messages
collection and see all documents describing your messages.
This is a sample chat web app based on Next.js and Rapid.io real-time database. The app is supposed to showcase usage of Rapid.io JavaScript SDK. You can open the app in multiple tabs or windows and start creating channels and posting messages. All the changes are promoted immediately across all clients. Also, try to turn off/on your network connection, do some changes and see how Rapid.io handles all of them.