2010.04.23 - Updated to Node 0.1.91

Enjoy the hyper performance boosts of Net2 branch merge on Node.

2010.04.05 - nodeJuice Demo at Apture

San Francisco JavaScript Meetup #10 at Apture. A live demo with audience participation using nodeJuice is scheduled at Apture in San Francisco on Thursday, April 22nd at 6:00pm. Participate by using your mobile devices and laptops to see changes made on the fly.

Location: Apture 539 Bryant St, #401 San Francisco, CA 94107
Date: Thursday, April 22nd at 6:00pm

Point your device at http://nodejuice.com to watch updates in real time. This event has concluded. Come next time!

2010.04.05 - Updated to Node 0.1.33

Download the latest performance enhanced NodeJS 0.1.33 version (or later) to enjoy NodeJuice at blazing speeds!

JavaScript V8 Seeker Server and WSGI

This is nodeJuice. It is a tool which allows you to develop with a push connection to your web browser. Automatic browser refresh on file change or update is what you can call it. Develop on one to many browsers simultaneously without needing to reload manually.

NodeJuice Video on Vimeo

Watch the video to see what NodeJuice can do.

New Browser Scroll Synchronization with NodeJuice

Now all connected browsers will stay in sync while you scroll along each page. Make sure to update your copy of nodeJuice today from GitHub. This is one of several new features in development for nodeJuice 1.5.0 release.

NodeJuice Does What?

nodeJuice will transform the regular web developer into a ninja programmer.* Check out the development enhancements:

NodeJuice sits Between the Server and Browser

NodeJuice sits between your web server and browser with a BOSH style long polling comet connection. Works with all servers such as Apache, Passenger, Nginx, Cherokee, and more. A web server isn't required, NodeJuice comes with one in case you forgot yours. Works using many text editos like VIM, TextMate, Emacs, Dreamweaver and more. NodeJuice comes with all the built-in tools you need to edit your files dynamically in real time. NodeJuice works with IE, Safari, FF, Opera, Chrome and more. There is nothing like the feeling you get when you press Save on your text editor and see all your browsers update instantly. It's Free + Open Source. It runs on NodeJS; a low level non-blocking network ready process with many capabilities.

Does The Juice run on Windows XP or Later?

No. However, using any net capable text editor, such as Dreamweaver, through FTP/SSH connection to a unix system with NodeJuice will work great. All Windows web browsers are supported.

NodeJuice on OSX, Linux and a few other Open Platforms

Develop with NodeJuice on any platform supported by nodejs. The recommended platform is a flavor of Linux with epoll dev headers.

How many browsers can I have connected to NodeJuice?

Like the Tootsie Pop, it's more than you want to count. Apache will have trouble with concurrency before nodejuice does.

Seeker Server: Watch the Video

It updates all connected browsers when a change occurs. Automatic browser refresh on file change or update is what you can call it. Seeker Server works on all servers. Even without a server. Seeker Server is independent of WSGI and can be used with other servers such as Apache. Watch the Video

Apache and Seeker Server (Sidekick)

NOTE: This step isn't necessary if you are using nodeJuice WSGI. This step is for Apache and other web servers. In order to easily use apache or other web servers, simply setup Sidekick:
  1. Copy nodejuice.js configuration into your application dir. This is the directory where your PHP, Ruby, Perl or Python files live.
    cp ./nodejuice/demos/apache/nodejuice.js /my/dir/.
  2. Edit the configuration file to point the fetch variable at your server.
    // nodejuice.js - the config file
    exports.sidekick = {
        host  : null, // Leave 'null' to listen on all hosts.
        port  : 8010, // access your server from this port.
        fetch : {     // point to your web server.
            host : 'localhost', // <-- point this to Apache or other server.
            port : 8080         // <-- point this to Apache or other server.
        }
    };
    
    exports.seeker = {
        host   : null,  // Leave 'null' to listen on all hosts.
        port   : 8002,  // port :-/
        delay  : 180,   // time in ms before page starts to reload.
                        // setting too low will cause file read errors in Apache
        wait   : 1200,  // time in milliseconds before a new connection.
                        // setting too low will make crazziness.
        add    : true,  // allow new file to push updates.
        remove : true,  // allow file delete to push updates.
        touch  : false, // allow file touch to push updates.
        access : false, // allow file reads to push updates.
        bits   : true,  // allow chmod/chown to push updates.
        save   : true,  // allow file save to push updates.
        dir    : true,  // allow directory changes to push updates.
        ignore : [      // path or file name to ignore.
            /\/\./,
            /git$/,
            /svn$/,
            /cvs$/,
            /swp$/,
            /~$/
        ]
    };
  3. Launch ./nodejuice seeker server.
    ./nodejuice /my/dir/ sidekick
  4. Point your web browser to Sidekick url.
    http://localhost:8010/

Seeker Server and Apache (Bypass Sidekick Server)

NOTE: This step isn't necessary if you are using nodeJuice WSGI. This is an alternative approach for Apache and other web servers. It is recommended that you use Sidekick Setup. Using Sidekick isn't required with Apache or another web server. However Sidekick provides error detection and will allow nodeJuice to keep a connection open even if Apache throws an error. It is recommended that you use Sidekick Setup.
  1. Copy nodejuice.js configuration into your application dir. This is the directory where your PHP, Ruby, Perl or Python files live.
    cp ./nodejuice/demos/apache/nodejuice.js /my/dir/.
  2. Launch ./nodejuice seeker server.
    ./nodejuice /my/dir/ seeker
  3. Paste the following in the HEAD Tag of all HTML files.
    <script src="http://localhost:8002"></script>
This method won't be as cool as using nodeJuice's Sidekick in the face of dangerous errors in your PHP, Ruby or Python applications. So be careful!

WSGI

To launch nodeJuice as an instant web server on any directory:

./nodejuice /path/to/directory

To create simple web application /rad:

// app-file.js
rad ( /^\/about$/, {
    file : '/templates/about.htm',
    info : 'some info here'
} )

rad ( /.*/, 'hello world' )

An advanced (and faster) web application will look like:

// app-file.js
var app = exports
app.journey = function( request, response ) {
    response.impress( '/templates/index.htm', {
        right_now : new Date
    } )
}
Above are two example apps on nodeJuice V8 WSGI. Simple right? It's like Google App Engine GAE and other WSGI Frameworks. The advanced web app example is faster and provides extra fallbacks. However the rad() example is easy. To run this application type:
./nodejuice /path/to/directory
This will launch both WSGI and Seeker Server. Open to view:
http://localhost:8080/
However, that isn't the raddest part. You are probably here to see what Seeker Server can do.

nodeJuice will transform the regular web developer into a ninja programmer.*

This is sorta true, but don't cry if your ninja day fails to arrive. Using NodeJuice will provide a super interface to better assist a developer's understanding of the mechanics by visually seeing results of every action, easily. Add some text, press save and see the change instantly.