{"_id":"@conorpai/koa-static-router","_rev":"2-f50a73147707a9998e3a08e66abb56a9","name":"@conorpai/koa-static-router","dist-tags":{"latest":"1.1.8"},"versions":{"1.1.7":{"name":"@conorpai/koa-static-router","version":"1.1.7","repository":{"type":"git","url":"git+https://github.com/ConorPai/koa-static-router.git"},"description":"Serving for koa-send to be a static server","main":"index.js","scripts":{"test":"test"},"author":{"name":"baiguangnan@163.com"},"license":"MIT","dependencies":{"koa-send":"^5.0.0"},"keywords":["koa","file","static","sendfile","router"],"engines":{"node":">= 7.6.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/ConorPai/koa-static-router/issues"},"homepage":"https://github.com/ConorPai/koa-static-router#readme","_id":"@conorpai/koa-static-router@1.1.7","_nodeVersion":"8.17.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-YHdgzpWoj6lt1Yp0aTpGJ+wMMxidUbvBZQbI/R2jI09aDccPKqdHtCcgaJyTwO6eQQXVnru4XIpwhRRhoeMG1w==","shasum":"10f0160c4a27fd5ef176a615913e830afde5ceb3","tarball":"https://registry.npmjs.org/@conorpai/koa-static-router/-/koa-static-router-1.1.7.tgz","fileCount":3,"unpackedSize":3316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqNvPCRA9TVsSAnZWagAAiH0P/2/U18URCjlRO5+NOlQA\neeKEi0qXkMgC0C3Tkl+Owk2dhw3+4GDtenh9mFaioRX+wmitrTPQO4mpV1lO\nmSwqreuBMSXQMd4pUsNac2uSQWZToiKh38rhPjylay824mVBhmNaEGEk6BmB\nTR7VHOMcy2K+QylG1wgGKTX+EQiJ7Bfa7+UnS+F7XpB2knWc2rWNhHCLCOGe\nG+HFHTuXksKlcHzddOon5RZjAdySesmdITrPFi+UhhUK+DxTS1xHeJZM7j5k\nuVurnnDJPEeahGZ+JKe0XRbEJn15HE/r5bHEzmDpXfxFME6P4trUm/EljhOg\nU+geF4TDaDia1iUi6C1v6Ap5ncOEalwZhOaYiWW1v84eVGjYuppp2eSANasf\nFtuCJuapPyBC2sSzjJ0QiffOIcim2KKz4Q4smhBsJJEokxguzNZWZXU3r5T5\nYiwk/qVhTkBkdxSiVRo3UqKT5iewUXcQLHN+JEPQfgXO2LjycPMkuSnTP9WZ\nraaQnTn/2ouQpJb7WvNLt+QvP3dDaE4UwzUUTMNxc4ymEWTUqxFF9D2u9cth\nBWaoxLrVBL7TooNl66AeoB4iGBbto1ihFVjMRXM3ogfBvK2zRTYHDH6KlPG/\naClHMSO7qo8pjxZhJUNuMzuDhBAg3VxZ5ghPdKX1gTcLTMCAhw4PfyKn+fAi\nIz3Z\r\n=gysp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBEU8A9k66ECDjVSnA86LCXnPOeAOy6pznVmBcAvUiZNAiBhsaDUOkWzm+Uln7PZ5Coz4WnkzpUZeM4AjlbUJefRFw=="}]},"maintainers":[{"name":"conorpai","email":"baiguangnan@163.com"}],"_npmUser":{"name":"conorpai","email":"baiguangnan@163.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/koa-static-router_1.1.7_1588124622623_0.4455551921318146"},"_hasShrinkwrap":false},"1.1.8":{"name":"@conorpai/koa-static-router","version":"1.1.8","repository":{"type":"git","url":"git+https://github.com/ConorPai/koa-static-router.git"},"description":"Serving for koa-send to be a static server","main":"index.js","scripts":{"test":"test"},"author":{"name":"baiguangnan@163.com"},"license":"MIT","dependencies":{"koa-send":"^5.0.0"},"keywords":["koa","file","static","sendfile","router"],"engines":{"node":">= 7.6.0"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/ConorPai/koa-static-router/issues"},"homepage":"https://github.com/ConorPai/koa-static-router#readme","_id":"@conorpai/koa-static-router@1.1.8","_nodeVersion":"8.17.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-ATY2xCSqs7snAadtos2ZVrHiIRuOLC6AexAGe9PiItR8zK2K38zGSWbZl5okhjfzU5ndRHZ3VWnC25Opijb+pw==","shasum":"f69d44fb8ca60c6ca976c34d4028c1088a5b31ce","tarball":"https://registry.npmjs.org/@conorpai/koa-static-router/-/koa-static-router-1.1.8.tgz","fileCount":3,"unpackedSize":3534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqOmKCRA9TVsSAnZWagAAEwQP/1FXTMeEUuLLI7JuaV6w\n5b1pt2zuFYhwoOltIyfXXJaygOhZoZ6RGZgb0gl9VuHQFVvFqPFxHElTMAZ1\nSu1Y3VZ/3u9OuN9rWXThdjdC7syiuhjnTwFOJtIQXMD2nVZAeDt/NESjOnu4\nve5To61Nq15GAcrWhwI1j9eajLsyZMt9q/Nk0thIadMs0wgryEVn4lzqMZFa\nB6apfvvQ6QBCcAXj49Sx1pPsyOg6K4cZ0gXklrxD0kd4hLAuM4wBUTdTCleu\nw5p9HFgnf9TDWIZcri+4WK51uWsZWQ5FLTCWe34Q1qzJbDGe/vbpDb2NbfiT\nhZwBil5fb6IqQSq/JArORsxn5AtAnU6IT99px7HvifXyajt0tBX6jzN+nrKd\nRWzSdHMCCtowf2KRFk3yTxG5cYhZLx3rVuonrvo70iufqBxJBdlbLBtDDmQm\nitz+/5IiTlZElQthQJ9dFwD+hyEZzIHxeq67ttCmUWRmTWxYIO/xJ4i+/HPw\nKxTqj335DkP+0yMstNZk6sdchESKItw9YAMQNGgHLZEGE6QIvqmdHtHOChKw\nAeB+gIwcvIjJVNamTd2emmllpYkMgq+uZTjYYFBTCYNXzzHUnN2VGqiLJ2JJ\nPiIAG5Ov1Grp8k6tQqVJPoSCPImGdPn0XDjg62FdH1BDvdDCGu/ogV4t+Biy\ng3K/\r\n=pnXy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrMpCmZBYnElnj/4q1E+fyI0RF6bBDFXdiGADUcJqAPgIhALaWV1Zi2F8PJCaAuJLd7+ZszhEOt1FoDJjV41UirY2/"}]},"maintainers":[{"name":"conorpai","email":"baiguangnan@163.com"}],"_npmUser":{"name":"conorpai","email":"baiguangnan@163.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/koa-static-router_1.1.8_1588128137686_0.08999842051183649"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-29T01:43:42.592Z","1.1.7":"2020-04-29T01:43:42.759Z","modified":"2022-04-05T00:57:44.663Z","1.1.8":"2020-04-29T02:42:17.847Z"},"maintainers":[{"name":"conorpai","email":"baiguangnan@163.com"}],"description":"Serving for koa-send to be a static server","homepage":"https://github.com/ConorPai/koa-static-router#readme","keywords":["koa","file","static","sendfile","router"],"repository":{"type":"git","url":"git+https://github.com/ConorPai/koa-static-router.git"},"author":{"name":"baiguangnan@163.com"},"bugs":{"url":"https://github.com/ConorPai/koa-static-router/issues"},"license":"MIT","readme":"# koa-static-router\n![](https://img.shields.io/badge/npm-1.1.3-blue.svg)\n![](https://img.shields.io/badge/license-MIT-brightgreen.svg)\n\n\nStatic file serving middleware with router\n\n## Installation\n\n```js\n$ npm install koa-static-router\n```\n\n## Usage\n#### A Single Router\n```\n app.use(static({\n     dir,\n     route  \n }))\n```\n\n#### Multiple Router \n> please make sure that routing is same length when you choose Multiple Router   (多个路由时，请确保路由长度相同)\n\n> '/static/'         - >routing length = 1\n\n> '/static/image1/'  - >routing length =2\n```\napp.use(static([\n    {\n    dir',     //dir:static resource directory\n    router    //router:router\n},{\n    dir,\n    router  \n}\n]))\n\nconst static = require('koa-static-router');\n\n//   A Single Router\n// app.use(static({\n//     dir:'public',\n//     router:'/static/'   \n// }))\n\n\n//Multiple Router\napp.use(static([\n    {\n    dir:'public',     \n    router:'/public/image/'   //routing length = 2\n},{\n    dir:'static',\n    router:'/static/image/'   //routing length = 2\n}\n]))\n```\n","readmeFilename":"readme.md"}