0.0.9 • Published 9 years ago

express-camo v0.0.9

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

express-camo

Save remote files to local directory, send it to clients

NPM version Build Status

Serve file with nginx internal request with X-Accel-Redirect header

server {
    listen 80;
    server_name file.localhost;
    location / {
        proxy_pass http://127.0.0.1:3000;
    }
    location /camo {
        internal;
        alias /you/path/to/express-camo/tmp;
        break;
    }
}

Options

tmpDir: path.join __dirname, '../tmp'   # Save files to the tmp directory, this will also be the nginx alias property
expire: 86400000                        # Save the file for the expire milliseconds
urlPrefix: '/camo'                      # The url prefix in nginx location block
getUrl: (req) -> req.query.url          # Get url param by your way
store:                                  # Define your store or use the default redis store (every store should have  getMime/setMime function)
0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago