https://github.com/ajb413/pubnub-objects-js-chat-demo
JavaScript Chat App with PubNub Objects used for ChatRooms, Users, and Memberships.
https://github.com/ajb413/pubnub-objects-js-chat-demo
chat chat-application chat-room javascript pubnub pubnub-api pubnub-chatting real-time realtime realtime-messaging
Last synced: 6 months ago
JSON representation
JavaScript Chat App with PubNub Objects used for ChatRooms, Users, and Memberships.
- Host: GitHub
- URL: https://github.com/ajb413/pubnub-objects-js-chat-demo
- Owner: ajb413
- Created: 2019-09-18T00:07:37.000Z (about 6 years ago)
- Default Branch: pages
- Last Pushed: 2019-09-19T22:47:14.000Z (about 6 years ago)
- Last Synced: 2025-02-04T17:20:24.410Z (8 months ago)
- Topics: chat, chat-application, chat-room, javascript, pubnub, pubnub-api, pubnub-chatting, real-time, realtime, realtime-messaging
- Language: JavaScript
- Homepage: https://ajb413.github.io/pubnub-objects-js-chat-demo/
- Size: 27.3 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Chat Demo with PubNub and Objects
[PubNub](https://www.pubnub.com/?devrel_gh=pubnub-objects-js-chat-demo) 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](https://www.pubnub.com/docs/web-javascript/pubnub-objects?devrel_gh=pubnub-objects-js-chat-demo).
## Tutorial for Building Chat with PubNub and Objects
**[Blog post for Building Chat with PubNub and Objects](https://www.pubnub.com/blog/?devrel_gh=pubnub-objects-js-chat-demo)**[](https://ajb413.github.io/pubnub-objects-js-chat-demo/)
## Run
Make a PubNub Account and get your forever free [PubNub API Keys](https://dashboard.pubnub.com/signup?devrel_gh=pubnub-objects-js-chat-demo). Then enable **Storage & Playback** with unlimited retention in the [Admin Dashboard](https://dashboard.pubnub.com/?devrel_gh=pubnub-objects-js-chat-demo). 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**
```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.