0.0.9 • Published 10 years ago

express-camo v0.0.9

Weekly downloads
2
License
MIT
Repository
github
Last release
10 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

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago