initial commit

This commit is contained in:
Tomomi Imura
2014-11-24 15:51:58 -08:00
parent 9e5e25ddc1
commit 89d4973861
10 changed files with 326 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
# PubNub JavaScript APIs Example: Super Simple Chat Demo
This is a super simple chat web app, built with using [PubNub JavaScript APIs][pubnub].
## Live Demo
Try this [chat room demo][demo] on multiple browser windows.
## Send and Receive Messages with PubNub APIs
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.
```
// Send a message
PUBNUB.publish({ channel: 'chat', message: "hello!" });
```
```
// Receive messages
PUBNUB.subscribe({ channel: 'chat', callback: function(m){console.log(m)}});
```
Super easy!
## So, What is PubNub?
PubNub is a globally distributed *data stream* network, a cloud service that developers use to build and scale real-time applications. We connect to over 250 million devices with billions of monthly real-time transactions for financial services, social apps, online auctions, multi-player games, telecom infrastructure, retail apps etc. PubNub also enables many Internet of Things (IoT) solutions for home automation, connected cars, retail, transportation and many others.
Are you looking for the SDKs in different languages? visit our [developers page]!
PubNub creates and supports over 50 languages and development platforms with our SDKs, inluding node.js, ruby, python, Objective-C, etc, etc!
Happy hacking :-)
[Demo]: http://pubnub.github.io/super-simple-chat/index.html
[pubnub]: http://www.pubnub.com/docs/javascript/javascript-sdk.html
[dev]: http://www.pubnub.com/developers/