downloads
Across all versions.
Download trend unavailable.
compatibility
Runtime metadata.
node>=20.16.0
esmtypes
Across all versions.
Download trend unavailable.
Runtime metadata.
Estimated unpacked size across 1 packages.
178.3 kB
Includes dependencies.
Universal Server based on web standards. Works with Deno, Bun and Node.js.
export default {
fetch(req: Request) {
return Response.json({ hello: "world!" });
},
};Then, run the server using your favorite runtime:
# Node.js
$ npx srvx # npm
$ pnpx srvx # pnpm
$ yarn dlx srvx # yarn
# Deno
$ deno -A npm:srvx
# Bun
$ bunx --bun srvxYou can also use srvx fetch to directly call your server handler without starting a server:
$ npx srvx fetch /api/usersSee CLI documentation for more options.
👉 Visit the 📖 Documentation to learn more.
corepack enablepnpm installpnpm build --stubpnpm devPublished under the MIT license.
Made by @pi0 and community 💛
🤖 auto updated with automd