-
Notifications
You must be signed in to change notification settings - Fork 0
Using the NodeJS Zazl Optimizer
If you have NodeJS installed (requires version >= 0.6) you can try the Node.js Zazl Optimizer.
It supports :
- Validation based caching.
- Gzipping of the response where applicable using Node.js zlib support
- The response can be javascript compressed by uglify-js
- Resources and Analysis data are cached for better response times (The first request on server start will be the slowest but from then on request will be substantially faster).
-
Install it via npm :
npm install zazloptimizer -
To try it out you can download the available examples, create an examples directory and unzip it into that.
-
To run via Connect run the following :
node node_modules/.bin/zazlconnect examples -
You can add node_modules/.bin to your PATH env to remove the need to prefix zazlconnect.
-
Note On windows you may have to bypass using the symlink and reference the js module directly. e.g
node node_modules\zazloptimizer\jsbin\zazlconnect.js examples -
To run on a different port :
node node_modules/.bin/zazlconnect examples 9080 -
To turn off javascript compression (on by default, via uglify-js) :
node node_modules/.bin/zazlconnect examples 9080 false -
There are two samples available in the examples.zip that use direct injection for script loading.
http://localhost:8080/inject_amdcalendar.htmlhttp://localhost:8080/inject_amddeclarative.html