{"name":"srvx","version":"0.1.1","license":"MIT","_id":"srvx@0.1.1","maintainers":[{"name":"pi0","email":"pyapar@gmail.com"}],"homepage":"https://github.com/unjs/srvx#readme","bugs":{"url":"https://github.com/unjs/srvx/issues"},"dist":{"shasum":"5fc1d8cea988849a2d85bc21ca387d60d6d2ad79","tarball":"http://registry-npm.ywwl.com/srvx/download/srvx-0.1.1.tgz","fileCount":20,"integrity":"sha512-SSQJNUQygHso16xWOurmc0o0+tcQRZcnJy4sb+eJqjLu/IVAPB+bUSSL+qIqlmstNhFw1bjbVjWGgzLiNV/fNg==","signatures":[{"sig":"MEYCIQDBhsSIoq/Cv2I7HwdtuyeL1KkGEqqeoXknYGYA1Sm69wIhAM7yoLhWIG/CfZyh9hOMHiIkS62qFtirr558Rl27wAtZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53712,"size":11199,"noattachment":false,"key":"/srvx/-/srvx-0.1.1.tgz"},"type":"module","types":"./dist/types.d.mts","exports":{".":{"bun":"./dist/bun.mjs","deno":"./dist/deno.mjs","node":"./dist/node.mjs","types":"./dist/types.d.mts"},"./types":{"types":"./dist/types.d.mts","import":"./dist/types.mjs"},"./node-utils":{"types":"./dist/node-utils/index.d.mts","import":"./dist/node-utils/index.mjs"}},"gitHead":"a910615d09d72ec8b8415aeb9b667b7479ea467f","scripts":{"dev":"vitest dev","lint":"eslint . && prettier -c .","test":"pnpm lint && pnpm test:types && vitest run --coverage","build":"unbuild","prepack":"pnpm build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","lint:fix":"automd && eslint . --fix && prettier -w .","bench:node":"node test/bench-node/_run.mjs","test:types":"tsc --noEmit --skipLibCheck"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"repository":{"url":"git+https://github.com/unjs/srvx.git","type":"git"},"_npmVersion":"10.8.2","description":"Universal Server API based on web platform standards. Works seamlessly with Deno, Bun and Node.js.","directories":{},"sideEffects":false,"_nodeVersion":"20.18.0","dependencies":{"cookie-es":"^1.2.2"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.12.1","devDependencies":{"jiti":"^2.3.3","srvx":"^0.0.0","execa":"^9.4.0","automd":"^0.3.12","eslint":"^9.12.0","vitest":"^2.1.3","unbuild":"^2.0.0","prettier":"^3.3.3","@types/bun":"^1.1.11","typescript":"^5.6.3","@types/deno":"^2.0.0","@types/node":"^22.7.5","changelogen":"^0.5.7","get-port-please":"^3.1.2","@hono/node-server":"^1.13.2","eslint-config-unjs":"^0.4.1","@vitest/coverage-v8":"^2.1.3","@mjackson/node-fetch-server":"^0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/srvx_0.1.1_1729215410616_0.11973877144042167","host":"s3://npm-registry-packages"},"readme":"# λ srvx\n\n<!-- automd:badges color=yellow packagephobia -->\n\n[![npm version](https://img.shields.io/npm/v/srvx?color=yellow)](https://npmjs.com/package/srvx)\n[![npm downloads](https://img.shields.io/npm/dm/srvx?color=yellow)](https://npm.chart.dev/srvx)\n[![install size](https://badgen.net/packagephobia/install/srvx?color=yellow)](https://packagephobia.com/result?p=srvx)\n\n<!-- /automd -->\n\nUniversal Server based on web standards. Works with [Deno](https://deno.com/), [Bun](https://bun.sh/) and [Node.js](https://nodejs.org/en).\n\n- ✅ Zero dependency\n- ✅ Full featured CLI with watcher, error handler, serve static and logger\n- ✅ Seamless runtime integration with same API ([handler](https://srvx.h3.dev/guide/handler) and [instance](https://srvx.h3.dev/guide/server)).\n- ✅ [Node.js compatibility](https://srvx.h3.dev/guide/node) with a [**close to native performance**](https://github.com/h3js/srvx/tree/main/test/bench-node).\n- ✅ Zero overhead [Deno](https://deno.com/) and [Bun](https://bun.sh/) support.\n\n## Quick start\n\n```js\nexport default {\n  fetch(req: Request) {\n    return Response.json({ hello: \"world!\" });\n  },\n};\n```\n\nThen, run the server using your favorite runtime:\n\n```bash\n# Node.js\n$ npx srvx       # npm\n$ pnpx srvx      # pnpm\n$ yarn dlx srvx  # yarn\n\n# Deno\n$ deno -A npm:srvx\n\n# Bun\n$ bunx --bun srvx\n```\n\nYou can also use `srvx fetch` to directly call your server handler without starting a server:\n\n```bash\n$ npx srvx fetch /api/users\n```\n\nSee [CLI documentation](https://srvx.h3.dev/guide/cli) for more options.\n\n👉 **Visit the 📖 [Documentation](https://srvx.h3.dev/) to learn more.**\n\n## Contribution\n\n- Clone this repository\n- Install the latest LTS version of [Node.js](https://nodejs.org/en/)\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`\n- Install dependencies using `pnpm install`\n- **Prepare stub mode using `pnpm build --stub`**\n- Run interactive tests using `pnpm dev`\n\n## License\n\n<!-- automd:contributors author=pi0 license=MIT -->\n\nPublished under the [MIT](https://github.com/h3js/srvx/blob/main/LICENSE) license.\nMade by [@pi0](https://github.com/pi0) and [community](https://github.com/h3js/srvx/graphs/contributors) 💛\n<br><br>\n<a href=\"https://github.com/h3js/srvx/graphs/contributors\">\n<img src=\"https://contrib.rocks/image?repo=h3js/srvx\" />\n</a>\n\n<!-- /automd -->\n\n<!-- automd:with-automd -->\n\n---\n\n_🤖 auto updated with [automd](https://automd.unjs.io)_\n\n<!-- /automd -->\n","publish_time":1729215410924,"_cnpm_publish_time":1729215410924,"dist-tags":{"latest":"1.0.8"}}