Live demo

Chat in 10 Lines of Code: a minimal JavaScript chat with PubNub

Try these · any order

Done: 0/4
  • To 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

Build it yourself

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.git
View on GitHub