Comparing version 0.0.3 to 0.0.4
@@ -49,3 +49,3 @@ var url = require('url') | ||
// serve the image from the cache ... | ||
cache(req, res, [size, src], function(cb) { | ||
cache(req, res, [req.params.size, src], function(cb) { | ||
@@ -52,0 +52,0 @@ debug('fetching %s', src) |
{ | ||
"name": "adaptive", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Simple adaptive image server based on smartcrop.js", | ||
@@ -5,0 +5,0 @@ "author": "Felix Gnass <fgnass@gmail.com>", |
@@ -72,3 +72,3 @@ ## adaptive | ||
### Deploying to Heroku/dokku | ||
## Deploying to Heroku/dokku | ||
@@ -80,19 +80,32 @@ The easiest way to deploy _adaptive_ to Heroku or a dokku instance is to create | ||
"name": "my-adaptive-images", | ||
"private": true, | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"start": "adaptive" | ||
}, | ||
"dependencies": { | ||
"adaptive": "*" | ||
} | ||
"dependencies": { "adaptive": "*" }, | ||
"scripts": { "start": "adaptive" } | ||
} | ||
``` | ||
## Logging | ||
### Prerequisites | ||
Adpative uses [node-canvas](https://github.com/Automattic/node-canvas) which in | ||
turn is based on Cairo. For system-specific installation instructions please | ||
refer to the [wiki](https://github.com/Automattic/node-canvas/wiki/). | ||
Dokku's Ubuntu image provides all required dependencies except for `libgif`. | ||
The easiest way to add it is to do this: | ||
``` | ||
echo https://github.com/ddollar/heroku-buildpack-apt > .buildpacks | ||
echo https://github.com/heroku/heroku-buildpack-nodejs >> .buildpacks | ||
echo libgif-dev > Aptfile | ||
git add .buildpacks Aptfile | ||
git commit -m "add node-canvas prerequisites" | ||
``` | ||
### Logging | ||
You can turn on [debug](https://www.npmjs.org/package/debug) output by setting | ||
the `DEBUG` env var to `adaptive:*` | ||
### The MIT License (MIT) | ||
## The MIT License (MIT) | ||
@@ -99,0 +112,0 @@ Copyright (c) 2014 Felix Gnass |
10456
129