EMAIL US
team@nowjs.com

IRC
#nowjs on Freenode

MAILING LIST
NowJS

TWITTER
@NowJSTeam

GET ON NPM
npm install now

USE NOWJS
NowJS creates a magic namespace "now", accessible by server and client
Functions and variables added to now are automatically synced, in real-time
Call client functions from the server and server functions from client
// On the Node.JS server
      
var nowjs = require("now");
var everyone = nowjs.initialize(httpServer);

everyone.now.getServerInfo = function(callback){
  db.doQuery(callback);
}
      
// In the browser

<script>

now.getServerInfo(function(data){
  // data contains the query results
});

</script>

      
Show more examples
// Variables are automatically synced
      
      
var nowjs = require("now");
var everyone = nowjs.initialize(httpServer);

everyone.now.myVariable = "some value";
      
<script>
      
      
console.log(now.myVariable);
// prints "some value"



</script>
      
// 10 line chatroom
      
var nowjs = require("now");
var everyone = nowjs.initialize(httpServer);
      
everyone.now.distribute = function(message){
  // this.now exposes caller's scope
  everyone.now.receive(this.now.name, message);
};
      
<script>  
now.name = prompt("What's your name?", "");  
now.receive = function(name, message){
  $("#messages").append("<br>"+name+": "+message);
}
$("#send-button").click(function(){
  now.distribute($("#text-input").val());
});
</script>
      
Create a chatroom in 12 lines of javascript
Server push

You can call easily client functions from the server and server functions from the client. That means you can push to the client simply by calling a client-side Javascript function on the server. Communication is achieved using Socket.io

No configuration

There's nothing to configure, really. You pass in the port you want NowJS to run on, or a http server object and you're good to go. On the client side, simply include
<script src="http://yourserver/NowJS/now.js"></script>
and the correct server/port will be included automatically

Compatible with frameworks

NowJS doesn't take over anything. You can use it with existing frameworks for both client Javascript and Node.js

No more AJAX

Never deal with XHR, routing, and serialization/parsing. NowJS takes care of that. Just call the function on the server.

Cross-domain support

You can use NowJS to communication cross-domain, push and pull, so throw out your XHR.

Cross browser and platform

NowJS v0.5 is supported in Chrome, Opera, Safari, Firefox, iPad/iPhone/iPod Touch, Android, webOS, Internet Explorer 9, and has beta support for IE8/7/6

Groups, aka 'rooms' or 'channels'

Using the `groups` feature, NowJS allows you to easily group clients into one or multiple groups. This allow you to address a subset of `everyone` via function calls. Checkout the multiroom chat example.

Coming soon: Distributed NowJS

Single threaded NowJS can handle up to 6500 concurrent users on the chatroom example
For customers that are looking for even greater scalability and reliability, we'll soon be licensing a distributed version of NowJS currently under development. Contact us at sales@nowjs.com