stephenlb / nodejuice

Automatic browser refresh on file change or update is what you can call it. NodeJuice is a set of tools which allows you to develop with a push connection to your web browser. JavaScript V8 Seeker Server and Web Server Gateway Interface. nodeJuice Seeker Server works with all other servers including Apache, Passenger, Nginx, Cherokee, and more. A web server isn't required, NodeJuice comes with one in case you forgot yours. It runs on NodeJS; a low level non-blocking network ready process with many capabilities. This is a tool that every web developer needs and has wanted for a very long time. IRC @ #node.js
http://nodejuice.com
Other
78 stars 3 forks source link

=============================================================================== NODEJUICE JavaScript V8 Seeker Server and WSGI

Website: http://nodejuice.com

Documentation: http://nodejuice.com/documentation Watch a video: http://www.vimeo.com/8459839 Setup With Apache and More: http://nodejuice.com/#sidekick

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 will transform the regular web developer into a ninja programmer. This technology works with all servers (apache, nginx, etc.) and brwosers (Firefox, IE, Safari, Chrome, etc.). NodeJuice requires a Unix Host to run and is compatible with all other OS's afterward. This means that you can work on Windows with a network capable text editor over SSH or just use WinSCP + favorite text editor.

SEVERS

seeker - used to auto refresh all attached clients. seeker server can be used with other webservers through sidekick. check out ./demos/apache to see an example. sidekick - used to keep connection with PHP, Ruby, Perl and Python on Apache. wsgi - (Web Server Gateway Interface) app and static content server.

WSGI is not Python's WSGI. WSGI stands for Web Server Gateway Interface.

USAGE:

./nodejuice /path/to/app [seeker] [wsgi] [sidekick]

seeker - pushes updates to your web browser. sidekick - use with apache and other web servers. wsgi - servers dynamic and static content. (Web Server)

APACHE MODE

Launch sidekick and seeker server only. Use this for APACHE (apache) or other web servers. ./nodejuice /home/stephen/application sidekick

NODEJUICE WSGI + SEEKER MODE

Launch seeker and wsgi servers making a static server. ./nodejuice /home/stephen/application

PRODUCTION MODE

Launch only wsgi server only. ./nodejuice /home/stephen/application wsgi

STATIC SERVER MODE

Launch Seeker and WSGI on any directory on your Hard Drive. ./nodejuice /home/stephen/application

DUMBASS MODE

Launch ALL Servers (This is pointless and harmless). ./nodejuice /home/stephen/application sidekick wsgi seeker

WSGI

As a bonus, nodeJuice comes with a full blown web server able to server static files and execute code on your server. See some examples below.

===================== rad() app EASIEST

rad ( /^\/rad-test$/, 'hello world rad() test!' )

rad ( /^\/$/, { // index page file : '/static/homepage.htm', // template info : 'Hi, this is information.', text : 'this is text!' } )

rad ( /^\/battle$/, function( request, response ) { rad.reply('something') } )

rad.get ( /^\/hello/, 'this is a normal page' )

rad.post ( /^\/submit-form/, 'posted!' )

rad.head ( /^\/check-file/ )

rad.put ( /^\/save-something/, 'saved!' )

rad['delete'] ( /^\/delete-something/, 'data has been deleted' )

rad( /.*/, 'hello world: last resort catch all get/post/etc' )

========================= journey() app FASTEST

var app = exports; app.journey = function( request, response ) { response.impress( '/templates/index.htm', { right_now : new Date } ) };

DIRECTORIES

library - vendor code and other chuncks of functionality. servers - node servers including seeker and wsgi. demos - example configurations and folders to show how nodejuice works. symlinks - pointers to other needed applications. provision - error templates (404, 500) website - nodeJuice website

=============================================================================== BENCHMARK -> DEV (with seeker server)

Server Hostname: 127.0.0.1 Server Port: 80

Document Path: / Document Length: 5332 bytes

Concurrency Level: 100 Time taken for tests: 4.008 seconds Complete requests: 10000 Failed requests: 0 Write errors: 0 Total transferred: 54920000 bytes HTML transferred: 53320000 bytes Requests per second: 2495.08 [#/sec] (mean) <-------<-------<------- Time per request: 40.079 [ms] (mean) Time per request: 0.401 [ms] (mean, across all concurrent requests) Transfer rate: 13381.83 [Kbytes/sec] received

=============================================================================== BENCHMARK -> PRODUCTION

Server Hostname: 127.0.0.1 Server Port: 80

Document Path: / Document Length: 5287 bytes

Concurrency Level: 100 Time taken for tests: 3.223 seconds Complete requests: 10000 Failed requests: 0 Write errors: 0 Total transferred: 53720000 bytes HTML transferred: 52870000 bytes Requests per second: 3102.85 [#/sec] (mean) <-------<-------<------- Time per request: 32.228 [ms] (mean) Time per request: 0.322 [ms] (mean, across all concurrent requests) Transfer rate: 16277.86 [Kbytes/sec] received