{"name":"broker","version":"1.0.1","description":"Express/Connect middleware that serves local or remote static files","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test/ --reporter dot"},"repository":{"type":"git","url":"https://github.com/divshot/broker.git"},"keywords":["divshot","superstatic","send","serve","proxy"],"author":{"name":"Divshot"},"license":"MIT","bugs":{"url":"https://github.com/divshot/broker/issues"},"homepage":"https://github.com/divshot/broker","dependencies":{"deliver":"^1.1.0","fast-url-parser":"^1.0.6-0","file-exists":"^0.1.1","mime-types":"^1.0.1"},"devDependencies":{"chai":"^1.9.1","connect":"^3.0.2","mkdirp":"^0.5.0","mocha":"^1.20.1","rmdir":"^1.0.4","supertest":"^0.13.0"},"gitHead":"2f8c6d5dfead363098ea113c4ea4a50ec295344d","_id":"broker@1.0.1","_shasum":"2fbc1eb9a1adf9b95440af402ce55aba0beae065","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}],"dist":{"shasum":"2fbc1eb9a1adf9b95440af402ce55aba0beae065","tarball":"http://registry-npm.ywwl.com/broker/download/broker-1.0.1.tgz","integrity":"sha512-nlQjqRYkg/NXsQtbi1r3BFvkjRTU16yChcJNFdg5HBMnbcGRwTpYaNBjjmZsO5gH9Th9au/KxS7DX/yUvXvGIA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCou7xG09MG5SyQb1eeNs39j2vzk8cPDnWl7IjWXUrB+wIhAPWk80yiwp17Lyt5pJgIrTIw5QKveeJpICLDKqmGMuxW"}],"size":3132,"noattachment":false,"key":"/broker/-/broker-1.0.1.tgz"},"readme":"# broker\n\nExpress/Connect middleware that serves local or remote static files. \n\n## Install\n\n```\nnpm install broker --save\n```\n\n## Usage\n\nServe static files\n\n```js\nvar express = require('express');\nvar broker = require('broker');\n\nvar app = express();\n\napp.use(broker({\n  root: '/public'\n}));\n\napp.listen(3000, function () {\n\n});\n```\n\nProxy remote files\n\n```js\nvar express = require('express');\nvar broker = require('broker');\n\nvar app = express();\n\napp.use(broker({\n  root: 'http://proxyserver.com'\n}));\n\napp.listen(3000, function () {\n\n});\n```\n\n### broker([options])\n\n* **options** - the options are similar to the [send module](https://github.com/visionmedia/send#options) because it uses this to serve local static files. Here are a few:\n  * `root` - the root directory if serving local files or the url to prepend to requests to proxy remote static files\n  * `index` - a string or array of strings that define the directory index file\n  * `dotfiles` - how to handle files that begin with a dot. These are usually hidden files. The default value is ignore. Available options:\n    * `allow` - No special treatment for dotfiles\n    * `deny` - Send a 403 for any request for a dotfile\n    * `ignore` - Pretend like the dotfile does not exist and 404\n  \n\n\n\n## Run Tests\n\n```\nnpm install\nnpm test\n```\n","publish_time":1410971411344,"_cnpm_publish_time":1410971411344,"dist-tags":{"latest":"1.0.1"}}