Srvx
λ Universal Server based on web standards.
Install / Use
/learn @h3js/SrvxREADME
λ srvx
<!-- automd:badges color=yellow packagephobia --> <!-- /automd -->Universal Server based on web standards. Works with Deno, Bun and Node.js.
- ✅ Zero dependency
- ✅ Full featured CLI with watcher, error handler, serve static and logger
- ✅ Seamless runtime integration with same API (handler and instance).
- ✅ Node.js compatibility with a close to native performance.
- ✅ Zero overhead Deno and Bun support.
Quick start
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 srvx
You can also use srvx fetch to directly call your server handler without starting a server:
$ npx srvx fetch /api/users
See CLI documentation for more options.
👉 Visit the 📖 Documentation to learn more.
Contribution
- Clone this repository
- Install the latest LTS version of Node.js
- Enable Corepack using
corepack enable - Install dependencies using
pnpm install - Prepare stub mode using
pnpm build --stub - Run interactive tests using
pnpm dev
License
<!-- automd:contributors author=pi0 license=MIT -->Published under the MIT license. Made by @pi0 and community 💛 <br><br> <a href="https://github.com/h3js/srvx/graphs/contributors"> <img src="https://contrib.rocks/image?repo=h3js/srvx" /> </a>
<!-- /automd --> <!-- automd:with-automd -->🤖 auto updated with automd
<!-- /automd -->Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
