{"_id":"@mjackson/node-fetch-server","_rev":"9-d4952176475ae6c132ac70c35cc4a69b","name":"@mjackson/node-fetch-server","dist-tags":{"latest":"0.7.0"},"versions":{"0.1.0":{"name":"@mjackson/node-fetch-server","version":"0.1.0","keywords":["http","server","request","response","fetch","web"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@mjackson/node-fetch-server@0.1.0","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/mjackson/remix-the-web/tree/main/packages/node-fetch-server#readme","bugs":{"url":"https://github.com/mjackson/remix-the-web/issues"},"dist":{"shasum":"0853c975f74c3b5156f7e2408496ccd5eba0f8b6","tarball":"https://registry.npmjs.org/@mjackson/node-fetch-server/-/node-fetch-server-0.1.0.tgz","fileCount":7,"integrity":"sha512-uFkH4CXsX5dU2sh5Ib9gP2bV4t2OYQph6y7s0kSSDlQ0XnIUXwjBZktXClzQV9BivynXWishvXK3ziItpHRcpw==","signatures":[{"sig":"MEUCIQDeZkb3C5Ba/RcrRp38kIIL+DyBBkQdFfEsLq89wpwezwIgIDIqFpKVmxaHUDD3SLfcfK3r5PV2go9pHEPggOfawzo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14298},"type":"module","exports":{".":"./dist/node-fetch-server.js","./package.json":"./package.json"},"gitHead":"55539bbedc5031e24a342d1559f2067145e79031","scripts":{"test":"node --import @swc-node/register/esm-register --test ./src/**/*.spec.ts","bench":"bash ./bench/runner.sh","build":"tsc --outDir dist --project tsconfig.lib.json","prepare":"pnpm run build"},"_npmUser":{"name":"mjackson","email":"mjijackson+npm@gmail.com"},"repository":{"url":"git+https://github.com/mjackson/remix-the-web.git","type":"git","directory":"packages/node-fetch-server"},"_npmVersion":"10.7.0","description":"Build servers for Node.js using the web fetch API","directories":{},"_nodeVersion":"22.1.0","_hasShrinkwrap":false,"devDependencies":{"@types/node":"^22.5.0"},"_npmOperationalInternal":{"tmp":"tmp/node-fetch-server_0.1.0_1725555281530_0.387076496063647","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@mjackson/node-fetch-server","version":"0.2.0","keywords":["http","server","request","response","fetch","web"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@mjackson/node-fetch-server@0.2.0","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/mjackson/remix-the-web/tree/main/packages/node-fetch-server#readme","bugs":{"url":"https://github.com/mjackson/remix-the-web/issues"},"dist":{"shasum":"577c0c25d8aae9f69a97738b7b0d03d1471cdc49","tarball":"https://registry.npmjs.org/@mjackson/node-fetch-server/-/node-fetch-server-0.2.0.tgz","fileCount":7,"integrity":"sha512-EMlH1e30yzmTpGLQjlFmaDAjyOeZhng1/XCd7DExR8PNAnG/G1tyruZxEoUe11ClnwGhGrtsdnyyUx1frSzjng==","signatures":[{"sig":"MEYCIQDLMWrmPTJbO2UBJt1fzBJ42P42a6pabHlptya3aUEY1AIhAJSXZGWQ2xfSWbSjxhc7n8981TcK5icTC9L8kPhke9db","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20479},"main":"./dist/node-fetch-server.js","type":"module","_from":"file:mjackson-node-fetch-server-0.2.0.tgz","types":"./dist/node-fetch-server.d.ts","exports":{".":{"import":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"},"default":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"},"require":{"types":"./dist/node-fetch-server.d.cts","default":"./dist/node-fetch-server.cjs"},"module-sync":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"}},"./package.json":"./package.json"},"scripts":{"test":"node --import @swc-node/register/esm-register --test ./src/**/*.spec.ts","bench":"bash ./bench/runner.sh","build":"tsup","release":"node --import @swc-node/register/esm-register ../../scripts/release.ts"},"_npmUser":{"name":"mjackson","email":"mjijackson+npm@gmail.com"},"_resolved":"/private/var/folders/n5/1lxhnzk56hg6b7vnl558364m0000gn/T/3410162914d11d764c4a4af2d8adfbf3/mjackson-node-fetch-server-0.2.0.tgz","_integrity":"sha512-EMlH1e30yzmTpGLQjlFmaDAjyOeZhng1/XCd7DExR8PNAnG/G1tyruZxEoUe11ClnwGhGrtsdnyyUx1frSzjng==","repository":{"url":"git+https://github.com/mjackson/remix-the-web.git","type":"git","directory":"packages/node-fetch-server"},"_npmVersion":"10.8.2","description":"Build servers for Node.js using the web fetch API","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","typescript":"^5.6.3","@types/node":"^22.5.0","@swc-node/register":"^1.10.9"},"_npmOperationalInternal":{"tmp":"tmp/node-fetch-server_0.2.0_1731627654836_0.6040049381704171","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"@mjackson/node-fetch-server","version":"0.3.0","keywords":["http","server","request","response","fetch","web"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@mjackson/node-fetch-server@0.3.0","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/mjackson/remix-the-web/tree/main/packages/node-fetch-server#readme","bugs":{"url":"https://github.com/mjackson/remix-the-web/issues"},"dist":{"shasum":"1c276f693bd02e7011d1784f50886b96f688291a","tarball":"https://registry.npmjs.org/@mjackson/node-fetch-server/-/node-fetch-server-0.3.0.tgz","fileCount":7,"integrity":"sha512-p+wzVVjYI6pi+t9hRMZngfwywE4CaPu3ZuYkB3+fkS1bSPAxZikXeIdeuOTiy5oqltOOODG0hoe55FR2PRmF/A==","signatures":[{"sig":"MEQCIEUtZjci+aR7oNW9h6bLEcYxvsoVPM/ydj9Iz9tJvreYAiAHSsNhAw/bJm8JO/HeiQzIcVqbXw2dG1JUNlUginPMZQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23420},"main":"./dist/node-fetch-server.js","type":"module","_from":"file:mjackson-node-fetch-server-0.3.0.tgz","types":"./dist/node-fetch-server.d.ts","exports":{".":{"import":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"},"default":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"},"require":{"types":"./dist/node-fetch-server.d.cts","default":"./dist/node-fetch-server.cjs"},"module-sync":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"}},"./package.json":"./package.json"},"scripts":{"test":"node --import @swc-node/register/esm-register --test ./src/**/*.spec.ts","bench":"bash ./bench/runner.sh","build":"tsup","release":"node --import @swc-node/register/esm-register ../../scripts/release.ts"},"_npmUser":{"name":"mjackson","email":"mjijackson+npm@gmail.com"},"_resolved":"/private/var/folders/n5/1lxhnzk56hg6b7vnl558364m0000gn/T/62fe760364c57c1dd3933fad483784d3/mjackson-node-fetch-server-0.3.0.tgz","_integrity":"sha512-p+wzVVjYI6pi+t9hRMZngfwywE4CaPu3ZuYkB3+fkS1bSPAxZikXeIdeuOTiy5oqltOOODG0hoe55FR2PRmF/A==","repository":{"url":"git+https://github.com/mjackson/remix-the-web.git","type":"git","directory":"packages/node-fetch-server"},"_npmVersion":"10.8.2","description":"Build servers for Node.js using the web fetch API","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","typescript":"^5.6.3","@types/node":"^22.5.0","@swc-node/register":"^1.10.9"},"_npmOperationalInternal":{"tmp":"tmp/node-fetch-server_0.3.0_1732065120659_0.7303394067338205","host":"s3://npm-registry-packages"}},"0.4.1":{"name":"@mjackson/node-fetch-server","version":"0.4.1","keywords":["http","server","request","response","fetch","web"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@mjackson/node-fetch-server@0.4.1","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/mjackson/remix-the-web/tree/main/packages/node-fetch-server#readme","bugs":{"url":"https://github.com/mjackson/remix-the-web/issues"},"dist":{"shasum":"a7332b3ca7675c1759511d1bc39ab09dcb262f9f","tarball":"https://registry.npmjs.org/@mjackson/node-fetch-server/-/node-fetch-server-0.4.1.tgz","fileCount":7,"integrity":"sha512-7R6Tvom12Uaybb10ClavdRiQmLevq0+cOfWgNVAm+FMsDoM20oXfLWAV91nOWZgwHQ4cDG8OUJiRJMlSztuhJA==","signatures":[{"sig":"MEQCIGgvWkJBrnHjb7GisiXjoYd/wx8C13sj0mM+RXhHuYTdAiBdKTSeLMSYWu+eEVOewyyVOZ0zdscdjCHEJhUMgZHC6A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23552},"main":"./dist/node-fetch-server.js","type":"module","types":"./dist/node-fetch-server.d.ts","exports":{".":{"import":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"},"default":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"},"require":{"types":"./dist/node-fetch-server.d.cts","default":"./dist/node-fetch-server.cjs"},"module-sync":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"}},"./package.json":"./package.json"},"gitHead":"b54924cbe5bf49f033fafc21be556fffc384f775","scripts":{"test":"node --import @swc-node/register/esm-register --test ./src/**/*.spec.ts","bench":"bash ./bench/runner.sh","build":"tsup","prepare":"pnpm run build"},"_npmUser":{"name":"mjackson","email":"mjijackson+npm@gmail.com"},"repository":{"url":"git+https://github.com/mjackson/remix-the-web.git","type":"git","directory":"packages/node-fetch-server"},"_npmVersion":"10.9.0","description":"Build servers for Node.js using the web fetch API","directories":{},"_nodeVersion":"22.11.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","typescript":"^5.6.3","@types/node":"^22.5.0","@swc-node/register":"^1.10.9"},"_npmOperationalInternal":{"tmp":"tmp/node-fetch-server_0.4.1_1733271717943_0.9200595433159318","host":"s3://npm-registry-packages"}},"0.5.0":{"name":"@mjackson/node-fetch-server","version":"0.5.0","keywords":["http","server","request","response","fetch","web"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@mjackson/node-fetch-server@0.5.0","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/mjackson/remix-the-web/tree/main/packages/node-fetch-server#readme","bugs":{"url":"https://github.com/mjackson/remix-the-web/issues"},"dist":{"shasum":"776cd550fefa53ac7dd7f92acf97221a55f37b59","tarball":"https://registry.npmjs.org/@mjackson/node-fetch-server/-/node-fetch-server-0.5.0.tgz","fileCount":7,"integrity":"sha512-GZrkGuP3N7he0GdK9CCqpjabqsXjJa4tp0yKw973FoGAAOGE6WTcp3kcosRdeGYqtoFn7IEu84g3pItk4wRBFg==","signatures":[{"sig":"MEUCIFyKvLQUdPAvujm6JEFu9fNPw2b4G26QIE2fz+6DZqm1AiEAm6wHisI4DcG3uEBHBvWy6XsS0wd3g+O278E7szTM4ng=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25641},"main":"./dist/node-fetch-server.js","type":"module","types":"./dist/node-fetch-server.d.ts","exports":{".":{"import":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"},"default":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"},"require":{"types":"./dist/node-fetch-server.d.cts","default":"./dist/node-fetch-server.cjs"},"module-sync":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"}},"./package.json":"./package.json"},"gitHead":"7fb6ee14a9eb1305f2a30aedfc8cd2e41b66e844","scripts":{"test":"node --experimental-strip-types --disable-warning=ExperimentalWarning --test ./src/**/*.test.ts","bench":"bash ./bench/runner.sh","build":"tsup","prepare":"pnpm run build"},"_npmUser":{"name":"mjackson","email":"mjijackson+npm@gmail.com"},"repository":{"url":"git+https://github.com/mjackson/remix-the-web.git","type":"git","directory":"packages/node-fetch-server"},"_npmVersion":"10.9.0","description":"Build servers for Node.js using the web fetch API","directories":{},"_nodeVersion":"22.11.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","@types/node":"^22.5.0"},"_npmOperationalInternal":{"tmp":"tmp/node-fetch-server_0.5.0_1733773015982_0.7776690625665221","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@mjackson/node-fetch-server","version":"0.5.1","keywords":["http","server","request","response","fetch","web"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@mjackson/node-fetch-server@0.5.1","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/mjackson/remix-the-web/tree/main/packages/node-fetch-server#readme","bugs":{"url":"https://github.com/mjackson/remix-the-web/issues"},"dist":{"shasum":"525608522a2c90394f85828486232bd4c24a24f7","tarball":"https://registry.npmjs.org/@mjackson/node-fetch-server/-/node-fetch-server-0.5.1.tgz","fileCount":7,"integrity":"sha512-0lMJlivCLV0nqPFPalS+EuyAy0ln/jUj/qM+PM5fZ3hqaQSopmToHHQmU/Mdbz3xdxjbg8wm4xHqkzqqTunKkw==","signatures":[{"sig":"MEUCIHQro1W48VSzLKVYvSpb7OvFLO9dZExQwFi9EDHX2loQAiEAjh/0UaRzUQay+QMdSM0YZY6mjlUxMtb4icCWE3593IY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26049},"main":"./dist/node-fetch-server.js","type":"module","_from":"file:mjackson-node-fetch-server-0.5.1.tgz","types":"./dist/node-fetch-server.d.ts","exports":{".":{"import":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"},"default":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"},"require":{"types":"./dist/node-fetch-server.d.cts","default":"./dist/node-fetch-server.cjs"},"module-sync":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"}},"./package.json":"./package.json"},"scripts":{"test":"node --experimental-strip-types --disable-warning=ExperimentalWarning --test ./src/**/*.test.ts","bench":"bash ./bench/runner.sh","build":"tsup"},"_npmUser":{"name":"mjackson","email":"mjijackson+npm@gmail.com"},"_resolved":"/tmp/df86fd05e3e259453f258e6caa4d226c/mjackson-node-fetch-server-0.5.1.tgz","_integrity":"sha512-0lMJlivCLV0nqPFPalS+EuyAy0ln/jUj/qM+PM5fZ3hqaQSopmToHHQmU/Mdbz3xdxjbg8wm4xHqkzqqTunKkw==","repository":{"url":"git+https://github.com/mjackson/remix-the-web.git","type":"git","directory":"packages/node-fetch-server"},"_npmVersion":"10.9.2","description":"Build servers for Node.js using the web fetch API","directories":{},"_nodeVersion":"22.13.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","@types/node":"^22.5.0"},"_npmOperationalInternal":{"tmp":"tmp/node-fetch-server_0.5.1_1737827323282_0.4572220434966028","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@mjackson/node-fetch-server","version":"0.6.0","keywords":["http","server","request","response","fetch","web"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@mjackson/node-fetch-server@0.6.0","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/mjackson/remix-the-web/tree/main/packages/node-fetch-server#readme","bugs":{"url":"https://github.com/mjackson/remix-the-web/issues"},"dist":{"shasum":"939d2989c9c2bd8babf8ec2e87daa60b40522053","tarball":"https://registry.npmjs.org/@mjackson/node-fetch-server/-/node-fetch-server-0.6.0.tgz","fileCount":7,"integrity":"sha512-oKsN2USJUN1KeqztM9Ixu/vVMXme1gdeAkWD5bDENzqXAYfuTWoRnuA5Yo2usYx0tqtx5R+PCAMtfF9LNy3Aag==","signatures":[{"sig":"MEUCIAJU5hUGQau7WHcnvL1FnMKIozGewQHyZhz+oytJvHgtAiEAjWN1jdnLxAMi0uUSJQeDOGpotrx1vV3vvT9oWMkO/Yg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26147},"main":"./dist/node-fetch-server.js","type":"module","_from":"file:mjackson-node-fetch-server-0.6.0.tgz","types":"./dist/node-fetch-server.d.ts","exports":{".":{"import":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"},"default":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"},"require":{"types":"./dist/node-fetch-server.d.cts","default":"./dist/node-fetch-server.cjs"},"module-sync":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"}},"./package.json":"./package.json"},"scripts":{"test":"node --experimental-strip-types --disable-warning=ExperimentalWarning --test ./src/**/*.test.ts","bench":"bash ./bench/runner.sh","build":"tsup"},"_npmUser":{"name":"mjackson","email":"mjijackson+npm@gmail.com"},"_resolved":"/tmp/ed34edd6e9e5a5248e3e3361717472e0/mjackson-node-fetch-server-0.6.0.tgz","_integrity":"sha512-oKsN2USJUN1KeqztM9Ixu/vVMXme1gdeAkWD5bDENzqXAYfuTWoRnuA5Yo2usYx0tqtx5R+PCAMtfF9LNy3Aag==","repository":{"url":"git+https://github.com/mjackson/remix-the-web.git","type":"git","directory":"packages/node-fetch-server"},"_npmVersion":"10.9.2","description":"Build servers for Node.js using the web fetch API","directories":{},"_nodeVersion":"22.13.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","@types/node":"^22.5.0"},"_npmOperationalInternal":{"tmp":"tmp/node-fetch-server_0.6.0_1738872737949_0.4240661317423353","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@mjackson/node-fetch-server","version":"0.6.1","keywords":["http","server","request","response","fetch","web"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@mjackson/node-fetch-server@0.6.1","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/mjackson/remix-the-web/tree/main/packages/node-fetch-server#readme","bugs":{"url":"https://github.com/mjackson/remix-the-web/issues"},"dist":{"shasum":"a576ba088093fa978dca2cb448924bf9b172bd21","tarball":"https://registry.npmjs.org/@mjackson/node-fetch-server/-/node-fetch-server-0.6.1.tgz","fileCount":7,"integrity":"sha512-9ZJnk/DJjt805uv5PPv11haJIW+HHf3YEEyVXv+8iLQxLD/iXA68FH220XoiTPBC4gCg5q+IMadDw8qPqlA5wg==","signatures":[{"sig":"MEUCICY5sqn4YKYRNiuWFAN6DRIzfaJEVgynqw4UVfcB232ZAiEA7MeRUFNoHsGkh+QfwxezQdJvak8u40eDFgoSfdpDxZ0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27653},"main":"./dist/node-fetch-server.js","type":"module","_from":"file:mjackson-node-fetch-server-0.6.1.tgz","types":"./dist/node-fetch-server.d.ts","exports":{".":{"import":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"},"default":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"},"require":{"types":"./dist/node-fetch-server.d.cts","default":"./dist/node-fetch-server.cjs"},"module-sync":{"types":"./dist/node-fetch-server.d.ts","default":"./dist/node-fetch-server.js"}},"./package.json":"./package.json"},"scripts":{"test":"node --experimental-strip-types --disable-warning=ExperimentalWarning --test ./src/**/*.test.ts","bench":"bash ./bench/runner.sh","build":"tsup"},"_npmUser":{"name":"mjackson","email":"mjijackson+npm@gmail.com"},"_resolved":"/tmp/178c36428da7d6e2d6f4297372ea8b3c/mjackson-node-fetch-server-0.6.1.tgz","_integrity":"sha512-9ZJnk/DJjt805uv5PPv11haJIW+HHf3YEEyVXv+8iLQxLD/iXA68FH220XoiTPBC4gCg5q+IMadDw8qPqlA5wg==","repository":{"url":"git+https://github.com/mjackson/remix-the-web.git","type":"git","directory":"packages/node-fetch-server"},"_npmVersion":"10.9.2","description":"Build servers for Node.js using the web fetch API","directories":{},"_nodeVersion":"22.13.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","@types/node":"^22.5.0"},"_npmOperationalInternal":{"tmp":"tmp/node-fetch-server_0.6.1_1738891212881_0.6484798937625127","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@mjackson/node-fetch-server","version":"0.7.0","description":"Build servers for Node.js using the web fetch API","author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/mjackson/remix-the-web.git","directory":"packages/node-fetch-server"},"homepage":"https://github.com/mjackson/remix-the-web/tree/main/packages/node-fetch-server#readme","license":"MIT","type":"module","types":"./dist/node-fetch-server.d.ts","module":"./dist/node-fetch-server.js","main":"./dist/node-fetch-server.cjs","exports":{".":{"types":"./dist/node-fetch-server.d.ts","import":"./dist/node-fetch-server.js","require":"./dist/node-fetch-server.cjs","default":"./dist/node-fetch-server.js"},"./package.json":"./package.json"},"devDependencies":{"@types/node":"^22.5.0","esbuild":"^0.20.2"},"keywords":["http","server","request","response","fetch","web"],"scripts":{"bench":"bash ./bench/runner.sh","build:types":"tsc --project tsconfig.build.json","build:esm":"esbuild src/node-fetch-server.ts --bundle --outfile=dist/node-fetch-server.js --format=esm --platform=node --sourcemap","build:cjs":"esbuild src/node-fetch-server.ts --bundle --outfile=dist/node-fetch-server.cjs --format=cjs --platform=node --sourcemap","build":"pnpm run build:types && pnpm run build:esm && pnpm run build:cjs","clean":"rm -rf dist","test":"node --experimental-strip-types --disable-warning=ExperimentalWarning --test ./src/**/*.test.ts"},"_id":"@mjackson/node-fetch-server@0.7.0","bugs":{"url":"https://github.com/mjackson/remix-the-web/issues"},"_integrity":"sha512-un8diyEBKU3BTVj3GzlTPA1kIjCkGdD+AMYQy31Gf9JCkfoZzwgJ79GUtHrF2BN3XPNMLpubbzPcxys+a3uZEw==","_resolved":"/tmp/1b3bdf682f8cd5d2d51979a53f1b0312/mjackson-node-fetch-server-0.7.0.tgz","_from":"file:mjackson-node-fetch-server-0.7.0.tgz","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-un8diyEBKU3BTVj3GzlTPA1kIjCkGdD+AMYQy31Gf9JCkfoZzwgJ79GUtHrF2BN3XPNMLpubbzPcxys+a3uZEw==","shasum":"3beda6645c4a1cee48a381f57a8585bb2257d1bc","tarball":"https://registry.npmjs.org/@mjackson/node-fetch-server/-/node-fetch-server-0.7.0.tgz","fileCount":20,"unpackedSize":63728,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA6CehVNsB1Qim8hjjwTwkFmjFtj/WwCe16x6zDhwNIDAiEAoABx3CoOIXB92EStd44AGwLMB5dDXgjDnWz9SkVCQxc="}]},"_npmUser":{"name":"mjackson","email":"mjijackson+npm@gmail.com"},"directories":{},"maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/node-fetch-server_0.7.0_1749170635011_0.8835126679148"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-05T16:54:41.447Z","modified":"2025-06-06T00:43:55.362Z","0.1.0":"2024-09-05T16:54:41.684Z","0.2.0":"2024-11-14T23:40:55.074Z","0.3.0":"2024-11-20T01:12:00.818Z","0.4.1":"2024-12-04T00:21:58.126Z","0.5.0":"2024-12-09T19:36:56.143Z","0.5.1":"2025-01-25T17:48:43.442Z","0.6.0":"2025-02-06T20:12:18.125Z","0.6.1":"2025-02-07T01:20:13.089Z","0.7.0":"2025-06-06T00:43:55.191Z"},"bugs":{"url":"https://github.com/mjackson/remix-the-web/issues"},"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","homepage":"https://github.com/mjackson/remix-the-web/tree/main/packages/node-fetch-server#readme","keywords":["http","server","request","response","fetch","web"],"repository":{"type":"git","url":"git+https://github.com/mjackson/remix-the-web.git","directory":"packages/node-fetch-server"},"description":"Build servers for Node.js using the web fetch API","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"readme":"# node-fetch-server\n\n`node-fetch-server` allows you to build servers for Node.js that use the [web Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) primitives (namely [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) and [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)) instead of the traditional `req`/`res` API used in libraries like [Express](https://expressjs.com/).\n\nThis web standard API is already used in many places across the JavaScript ecosystem:\n\n- [`Bun.serve`](https://bun.sh/docs/api/http#bun-serve)\n- [Cloudflare Workers](https://developers.cloudflare.com/workers/runtime-apis/handlers/fetch/)\n- [`Deno.serve`](https://docs.deno.com/api/deno/~/Deno.serve)\n- [Fastly Compute](https://js-compute-reference-docs.edgecompute.app/docs/)\n\nWhen you write servers using the `Request` and `Response` APIs, you maximize the chances that your code will be portable across these different JavaScript runtimes.\n\n## Features\n\n- Use web standard [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) and [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) APIs for building servers, instead of node-specific API\n- Seamless integration with `node:http` and `node:https` modules\n- Supports custom hostnames (e.g. using `process.env.HOST` on a VPS to set the host portion of incoming request URLs)\n- Supports streaming responses using `new Response(stream)`\n- Exposes remote client address info\n\n## Installation\n\n```sh\nnpm install @mjackson/node-fetch-server\n```\n\n## Usage\n\n```ts\nimport * as http from 'node:http';\nimport { createRequestListener } from '@mjackson/node-fetch-server';\n\nfunction handler(request: Request) {\n  return new Response('Hello, world!');\n}\n\nlet server = http.createServer(createRequestListener(handler));\n\nserver.listen(3000);\n```\n\nBy default `request.url` is derived from the value of the `Host` HTTP header and the connection protocol being used. To support custom hostnames using e.g. a `HOST` environment variable, you can use the `host` option:\n\n```ts\nimport * as assert from 'node:assert/strict';\nimport * as http from 'node:http';\nimport { createRequestListener } from '@mjackson/node-fetch-server';\n\nfunction handler(request: Request) {\n  // This is now true\n  assert.equal(new URL(request.url).host, process.env.HOST);\n  return new Response('Hello, world!');\n}\n\nlet server = http.createServer(createRequestListener(handler, { host: process.env.HOST }));\n\nserver.listen(3000);\n```\n\nInformation about the remote client IP and port is passed as the 2nd argument to your `FetchHandler`:\n\n```ts\nimport { type FetchHandler } from '@mjackson/node-fetch-server';\n\nlet handler: FetchHandler = (request, client) => {\n  return new Response(`The client IP address is ${client.address}`);\n};\n```\n\n## Low-level API\n\nIn addition to the high-level `createRequestListener()` API, this package also provides 2 low-level APIs that are useful when building custom `fetch`-based servers in Node.js:\n\n- `createRequest(req: http.IncomingMessage, res: http.ServerResponse, options: RequestOptions): Request`\n- `sendResponse(res: http.ServerResponse, response: Response): Promise<void>`\n\nThese two functions serve as an efficient, minimal translation layer between Node.js `req`/`res` objects and fetch `Request`/`Response` objects. You could build your own custom server like this:\n\n```ts\nimport * as http from 'node:http';\nimport { createRequest, sendResponse } from '@mjackson/node-fetch-server';\n\nlet server = http.createServer(async (req, res) => {\n  let request = createRequest(req, res, { host: process.env.HOST });\n\n  try {\n    let response = await customAppLogic(request);\n    await sendResponse(res, response);\n  } catch (error) {\n    console.error(error);\n    res.writeHead(500, { 'Content-Type': 'text/plain' });\n    res.end('Internal Server Error');\n  }\n});\n\nserver.listen(3000);\n```\n\n## Related Packages\n\n- [`fetch-proxy`](https://github.com/mjackson/remix-the-web/tree/main/packages/fetch-proxy) - Build HTTP proxy servers using the web fetch API\n\n## Benchmark\n\nA basic \"hello world\" benchmark shows `node-fetch-server` introduces considerable overhead on top of a vanilla `node:http` server. However, it is still able to serve more requests per second (and has higher overall throughput) than Express v4, so the slowdown should be acceptable for most applications.\n\n```\n> @mjackson/node-fetch-server@0.0.0 bench /Users/michael/Projects/remix-the-web/packages/node-fetch-server\n> bash ./bench/runner.sh\n\nPlatform: Darwin (24.0.0)\nCPU: Apple M1 Pro\nDate: 11/14/2024, 2:30:22 PM\n\nRunning benchmark for node:http@22.8.0 ...\n\nRunning 30s test @ http://127.0.0.1:3000/\n  12 threads and 400 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     9.97ms   31.92ms 786.67ms   99.09%\n    Req/Sec     4.45k   268.33     6.38k    93.69%\n  1594257 requests in 30.02s, 326.89MB read\n  Socket errors: connect 0, read 1317, write 6, timeout 0\nRequests/sec:  53110.92\nTransfer/sec:     10.89MB\n\nRunning benchmark for node-fetch-server@0.1.0 ...\n\nRunning 30s test @ http://127.0.0.1:3000/\n  12 threads and 400 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    22.74ms   81.06ms   1.46s    98.22%\n    Req/Sec     2.42k   185.82     4.30k    91.80%\n  866347 requests in 30.03s, 177.64MB read\n  Socket errors: connect 0, read 1496, write 3, timeout 0\nRequests/sec:  28849.46\nTransfer/sec:      5.92MB\n\nRunning benchmark for express@4.19.2 ...\n\nRunning 30s test @ http://127.0.0.1:3000/\n  12 threads and 400 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    36.46ms  125.89ms   1.99s    97.89%\n    Req/Sec     1.56k   146.86     2.93k    88.25%\n  558504 requests in 30.06s, 134.76MB read\n  Socket errors: connect 0, read 1261, write 11, timeout 36\nRequests/sec:  18579.11\nTransfer/sec:      4.48MB\n```\n\n## License\n\nSee [LICENSE](https://github.com/mjackson/remix-the-web/blob/main/LICENSE)\n","readmeFilename":"README.md"}