PubNub provides APIs for Connected Experiences. You can build solutions combining in-app chat, live notifications, device control, and more.
This chat demo uses plain old JavaScript to offer a global chat and group chats to users. These are easily implemented by using Spaces, Users, and Memberships which are a part of Objects.
Blog post for Building Chat with PubNub and Objects
Make a PubNub Account and get your forever free PubNub API Keys. Then enable Storage & Playback with unlimited retention in the Admin Dashboard. This will store your chat app's messages, so users can see messages they missed when they log on later.
Insert your PubNub API keys into app.js
const PUBNUB_PUBLISH_KEY = '_your_pubnub_publish_key_here_';
const PUBNUB_SUBSCRIBE_KEY = '_your_pubnub_subscribe_key_here_';
Open the index.html
file in your browser, or push the repository to your GitHub and enable GitHub pages.