{"_id":"@acastellon/connect-static","_rev":"1-6b148ce08ff2c57b027d04251e22f479","name":"@acastellon/connect-static","dist-tags":{"latest":"1.6.1"},"versions":{"1.6.0":{"name":"@acastellon/connect-static","version":"1.6.0","description":"static file server middleware for connect. loads files once at startup and saves gzipped versions in memory","main":"index.js","scripts":{"test":"node test/test.js"},"repository":{"type":"git","url":"git://github.com/antonio-castellon/connect-static.git"},"author":{"name":"Andrew Kelley","email":"superjoe30@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/antonio-castellon/connect-static/issues"},"homepage":"https://github.com/antonio-castellon/connect-static","dependencies":{"findit2":"~2.2.3","mime":"~2.4.4","pend":"~1.2.0","streamsink":"~1.2.0"},"gitHead":"3f9105269c72b2aa93479e7de8758ad2e1223e73","_id":"@acastellon/connect-static@1.6.0","_nodeVersion":"16.16.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-I1t1n7H3wYnqOQbmPq4O+lNhe5jgBKPaltaow+gqtmVYFlT5aeLaqazhxNmupnNI1PqlU7Y+xrl3YAgKys4njw==","shasum":"76d3c84dda2fecc4993e21afeb3ce89634298b0b","tarball":"https://registry.npmjs.org/@acastellon/connect-static/-/connect-static-1.6.0.tgz","fileCount":10,"unpackedSize":9810,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/7pfBDwpOZ2DDesVvInzfTzIhrLlfHznhrX5JbmBNmAIhAL7TXIO4voc93We+vQs53fqGql9oepP+MTAd466rBxvf"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjV7OcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpORg//RxLzEmCcRTjzvb/9OxOKrMHDDGf+VAbcC2sb/wV6IGku6bew\r\nAQfOWbNLtH78+KaaiHVZB9lg9T+3hf2ncmCxr3T9ZtYyt4GoQ0UBMWizIJgC\r\nxB2R8bmudNRzx+XJ4/fGqnZhw7yR72hWceIGeC6AFNWWPvBkadDLrr0k2yYD\r\nt8c8ww0qW8XVpZNLPfo2ahG7UqeBK6BEUYREID9AQmqU7PVCLuZGTk37ZKHR\r\nfW+nSj2/g1Lrog+A/KZuV2CNeSUDpqxzrp2AtKx0UhI/tYa/UotzP+eKU1Jy\r\noqLg41MhW8Dk6MF5+7I90JyBmQSf4vJEDCTiFt0Hoi8MxoKqIh08ytxbzyY7\r\nhpLMcbq4p1u9hLtjlMk0Uap4UeT1NnzKzWjaMln9y0tW/RV7Zp4t+l2mPOsT\r\nweUqwEBQcGSTT8prYrpR5WxiJ/Ani5encqXBErHEzxnjqR5UKhUiKyWLvgRf\r\nxjZHOfzlu/xO9DBBREtZpbtqD+eCT2vVjp8c1s7ifXAufdJ6iY/Vo7p3Gfir\r\nDms+UP8ZaE4v4sbIl0QQg9Bvbs5Eh9Gsc26NVRPymPtKMpsuH9yFsW6ojqK6\r\nqZcUCyZEod+1A+0nuAFH4nT0TdRds8qf6tKFDd3q+dSvtBdxRZ/ZDjW5tMqg\r\n+H+y3CRFD73A8IRSk7oFg6UqE0jkUK2icwI=\r\n=vQPF\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"acastellon","email":"antonio@castellon.ch"},"directories":{},"maintainers":[{"name":"acastellon","email":"antonio@castellon.ch"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/connect-static_1.6.0_1666691996277_0.3396236302649196"},"_hasShrinkwrap":false},"1.6.1":{"name":"@acastellon/connect-static","version":"1.6.1","description":"static file server middleware for connect. loads files once at startup and saves gzipped versions in memory","main":"index.js","scripts":{"test":"node test/test.js"},"repository":{"type":"git","url":"git://github.com/antonio-castellon/connect-static.git"},"author":{"name":"Andrew Kelley","email":"superjoe30@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/antonio-castellon/connect-static/issues"},"homepage":"https://github.com/antonio-castellon/connect-static","dependencies":{"findit2":"~2.2.3","mime":"~2.4.4","pend":"~1.2.0","streamsink":"~1.2.0"},"gitHead":"3f9105269c72b2aa93479e7de8758ad2e1223e73","_id":"@acastellon/connect-static@1.6.1","_nodeVersion":"16.16.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-XGe5mfXJCWTegFQEc9pYM9n1QVsKj02vyuAzA7wybnVmSL7Io7q4eBlcnk/3HxQ+CEbfKx05fpM5+G9UIOiPaQ==","shasum":"22e512b9625d0d7a1e20d40231591ade78b2ee47","tarball":"https://registry.npmjs.org/@acastellon/connect-static/-/connect-static-1.6.1.tgz","fileCount":10,"unpackedSize":10329,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVjaJf9b7Ld+rOZd4zqcYUuRut4llzPqliwOWUHewIkwIhAOY13bS/4pG259KKS0LAJWJ2jhLzqOaGuuSV3KcCURPJ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjV7RYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrmDg//fxshHSNlX4pxTaO2TFuK9mmnsoIW1/aXketJrutwHY+qedxO\r\nZdawVewK+lVvG8WjdB9GERwAENxLmbsfilYNYP1IPZGaXU0ToKlIxwsqFnuK\r\nSKT8CnHHljm+het6Sn0FV29dmoJMMO0405LyOln11vRrRVw8dbBHXuy/YdoI\r\nQ84JQE0wz5NCQB6PNcbtdOpMlC8IT1WpvxFYLwzqKSlJotwjHVqdyeiAzxSL\r\nfVAS1hLWBIcuBer9wMi/6yoVtI9LihsBqMULpIT36coznLDYfVALM/DfuWtA\r\nbDKf0rQc9EBJCpc097Fj182xAXZLJJKClWIi1aZQ/lD/1wQxGXA335NTr3F/\r\nygdj/czfLUzlX3WAeJULxKgfuAZ6IW23boVyKMB0+j/42XQ8iKuUecFieBMS\r\n1/cT2/IKw9GXIP/iHJjSQP/IVB8wFySSnunegdknHYnT8hJZW3Efv9MYKHpN\r\nXippsGp/nem2InyRqbdUL4F2bb4k4PYpN1Z7D2MkGPa/n/uhDPe+l7AxLy6z\r\nxE/A0czYrQ7MnjDr4CKF82lu7cm/c97+Z9toxlfvNc8HyIUT9spAfsH7gYsJ\r\nbm+4den2WrEqoeH22j+jVeuVLYSsSV9E0+T/JJrMQXhrz/5Wi50YRTTVlgYl\r\nPMK736wgSk0UMTYcN8b4g8z+bmBONh1fa5M=\r\n=f0PL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"acastellon","email":"antonio@castellon.ch"},"directories":{},"maintainers":[{"name":"acastellon","email":"antonio@castellon.ch"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/connect-static_1.6.1_1666692184632_0.277663507169166"},"_hasShrinkwrap":false}},"time":{"created":"2022-10-25T09:59:56.220Z","1.6.0":"2022-10-25T09:59:56.468Z","modified":"2022-10-25T10:03:04.984Z","1.6.1":"2022-10-25T10:03:04.918Z"},"maintainers":[{"name":"acastellon","email":"antonio@castellon.ch"}],"description":"static file server middleware for connect. loads files once at startup and saves gzipped versions in memory","homepage":"https://github.com/antonio-castellon/connect-static","repository":{"type":"git","url":"git://github.com/antonio-castellon/connect-static.git"},"author":{"name":"Andrew Kelley","email":"superjoe30@gmail.com"},"bugs":{"url":"https://github.com/antonio-castellon/connect-static/issues"},"license":"MIT","readme":"# static caching gzipping file server middleware for connect\r\n\r\nWhen you create the middleware, it will immediately scan the requested\r\ndirectory, gzip all the files, and save the cache into memory, where it\r\nwill forever remain. When a request hits the middleware it never touches\r\nthe file system. If gzipping a file results in >= 95% of the file size of\r\nthe original file size, connect-static discards the gzipped data and instead\r\nserves the file directly.\r\n\r\nAre you looking for the middleware that used to ship with express and connect?\r\nThat project is called [serve-static](https://github.com/expressjs/serve-static)\r\n\r\n## Supported HTTP Headers\r\n\r\n * `ETag`\r\n * `If-None-Match`\r\n * `If-Modified-Since`\r\n * `Accept-Encoding`\r\n * `Content-Encoding`\r\n\r\n## Usage\r\n\r\n```js\r\nvar createStatic = require('connect-static');\r\n\r\n// These are all defaults. If you leave any options out, this is what they\r\n// will be.\r\nvar options = {\r\n  dir: \"public\",\r\n  aliases: [\r\n    ['/', '/index.html'],\r\n  ],\r\n  ignoreFile: function(fullPath) {\r\n    var basename = path.basename(fullPath);\r\n    return /^\\./.test(basename) || /~$/.test(basename);\r\n  },\r\n  followSymlinks: true,\r\n  cacheControlHeader: \"max-age=0, must-revalidate\",\r\n};\r\ncreateStatic(options, function(err, middleware) {\r\n  if (err) throw err;\r\n  app.use('/', middleware);\r\n});\r\n```\r\n","readmeFilename":"README.md"}