Chat in 10 Lines of Code: a minimal JavaScript chat with PubNub
Try these · any order
Done: 0/4To do: Send a message
To do: Send 5 messages
To do: Open the app in another tab and receive a message
To do: Receive 3 messages
Make your own 10-line chat
Clone the repository, add your own keys, and open the page in two tabs. It has no build step and no dependencies to install.
GitHub
PubNubDevelopers/JavaScript-Simple-Chat
Clone the repository and replace the 'demo' publish and subscribe keys in index.html with the keys from your PubNub account. Then open index.html in your browser.
git clone https://github.com/PubNubDevelopers/JavaScript-Simple-Chat.gitYou might want to build next...
- In-App Chat
Real-Time Customer Support Demo
Log in as a support agent or as a customer and see how support chat, bot-to-agent handoff, and case management work in real time. Built with React and the PubNub Chat SDK.
- In-App Chat
Peer-to-Peer Payment Demo
Log in as two users on two simulated phones, send and request money, and chat about it in the same conversation. Built with Next.js and the PubNub Chat SDK.
- Collaboration
CoDoodler: Collaboration Demo
Sketch on a shared canvas with anyone who opens the demo. Strokes, cursors, and names sync live, built with plain JavaScript and the PubNub JavaScript SDK.