Gracie

JavaScript in the Browser. Optimized for development and deployment. Simple.

You've got some JavaScript files

-mysite
  -js
    slideshow.js
    amazing.js
    jquery.js

amazing.js depends on jquery.js

//require jquery.js
jQuery(document).ready(function() {
  //do amazing stuff...
});

Run Gracie

gracie /var/www/html/mysite/js

And load your JavaScript the good old fashioned way

<script type="text/javascript" src="
http://mysite.com:7763/gracie?sources=slideshow.js,amazing.js&minify=1">
</script>

What is Gracie?

Gracie is a lightweight file server aimed at serving JavaScript files in an optimized way. It does the following things:

Gracie is written in Node.js. You can integrate Gracie into your Node.js projects instead of using the bundled server if you want.

Gracie is very simple. You can used it with your existing JavaScript with no modifications. Just start up the Gracie server and request your change your script tags to source their JavaScript from the Gracie server. Optionally, you can use the //require syntax to specify which files depend on which other files. Then you don't have to keep track of a long list of files to load. Gracie will resolve the dependencies for you.

Download / Install Gracie

You need Node.js installed. You can get instructions at nodejs.org. If you are running Ubuntu, you can just execute these commands to install v0.2.6.

wget http://nodejs.org/dist/node-v0.4.1.tar.gz
tar xzf node-v0.4.1.tar.gz
sudo apt-get update
sudo apt-get install g++ libssl-dev
cd node-v0.4.1
./configure
make
sudo make install
cd ..
rm -rf node-v0.4.1
rm node-v0.4.1.tar.gz

Test

test content test content test content test content test content test content test content test content test content test content test content

test content test content test content test content test content test content test content test content test content test content test content

test content test content test content test content test content test content test content test content test content test content test content

test content test content test content test content test content test content test content test content test content test content test content

test content test content test content test content test content test content test content test content test content test content test content

test content test content test content test content test content test content test content test content test content test content test content

test content test content test content test content test content test content test content test content test content test content test content

test content test content test content test content test content test content test content test content test content test content test content