https://github.com/unjs/srvx
💥 Universal Server API based on web platform standards. Works seamlessly with Deno, Bun and Node.js.
https://github.com/unjs/srvx
Last synced: 7 months ago
JSON representation
💥 Universal Server API based on web platform standards. Works seamlessly with Deno, Bun and Node.js.
- Host: GitHub
- URL: https://github.com/unjs/srvx
- Owner: unjs
- License: mit
- Created: 2024-09-16T20:20:41.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-11-29T23:08:09.000Z (7 months ago)
- Last Synced: 2024-12-01T00:07:20.136Z (7 months ago)
- Language: TypeScript
- Homepage: https://srvx.unjs.io/
- Size: 521 KB
- Stars: 220
- Watchers: 2
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 💥 srvx
[](https://npmjs.com/package/srvx)
[](https://npm.chart.dev/srvx)Universal Server API based on web platform standards. Works with [Deno](https://deno.com/), [Bun](https://bun.sh/) and [Node.js](https://nodejs.org/en).
- ✅ Seamless runtime integration with identical usage ([handler](https://srvx.unjs.io/guide/handler) and
- ✅ Zero overhead [Deno](https://deno.com/) and [Bun](https://bun.sh/) support
- ✅ [Node.js compatibility](https://srvx.unjs.io/guide/node) with ~native perf and [fast response](https://srvx.unjs.io/guide/node#fast-response) support## Quick start
```js
import { serve } from "srvx";const server = serve({
port: 3000,
fetch(request) {
return new Response("👋 Hello there!");
},
});await server.ready();
console.log(`🚀 Server ready at ${server.url}`);
```👉 **Visit the 📖 [Documentation](https://srvx.unjs.io/) to learn more.**
## Development
local development
- Clone this repository
- Install the latest LTS version of [Node.js](https://nodejs.org/en/)
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`
- Install dependencies using `pnpm install`
- Run interactive tests using `pnpm dev`## License
Published under the [MIT](https://github.com/unjs/srvx/blob/main/LICENSE) license.
Made by [@pi0](https://github.com/pi0) and [community](https://github.com/unjs/srvx/graphs/contributors) 💛
![]()
---
_🤖 auto updated with [automd](https://automd.unjs.io)_