What is Juice?
Juice is a server-side web framework built around CommonJS modules and specifically the JSGI 0.3 proposal. Its an open-source stack released under the MIT license that comes bundled with its own development server and a javascript interpreter.
CommonJS aims to bring some portability to the world of serverside javascript, and the Juice core is no different. Right now we've only checked that it runs on Flusspferd (the JS interpreter based on spidermonkey that comes bundled in the dists) but in the future we'll make sure the Juice stack runs portably across all conforming CommonJS implementations
Why use Juice?
-
Javascript is fun.
If you enjoy working in javascript, then you'll enjoy Juice. If you don't, you probably won't get much out of it.
-
Lower barriers.
With your client-side and server-side code in the same language, your development won't hit as many communication blocks or gear changes.
-
Share code between client and server.
Common helpers and validation routines written only need writing once and can be used in your controllers, templates and client-side code.
Installation
Mac OS X (10.5+)
- Download and install Juice 0.1 (1.8M dmg)
- Open Terminal and create a project:
juice init helloworld - Start the server:
./helloworld/script/server - Visit your app at http://localhost:3000/
Windows (XP or newer)
- Download and extract Juice 0.1 (4.6M zip)
- Add
Juice/binto your path - Open a command prompt and create a project:
flusspferd juice init helloworld - Start the server:
flusspferd helloworld\script\server - Visit your app at http://localhost:3000/
Linux
We don't have a package built for you, but they are coming soon. If you really can't wait a day jump onto IRC and we'll walk you through getting it running.