This is a basic chat example. The code to the left, you can build realtime chat in 10 lines of JavaScript - just copy and paste the code into your favorite text editor and save as a .html.
Tasks like sending and receiving data through PubNub take a single function call. The basic “send” functionality happens through a publish() call.
And to “receive” all of the sent messages on a specific channel, simply make a subscribe() call. All of the network infrastructure and scaling is taken care of for you, so you spend time building your app, not the infrastructure.
PubNub empowers you to build cross-platform, supporting chat for mobile, browser, desktop, server, and even the Internet of Things. Build in one language, extend to every device!