Thanks to visit codestin.com
Credit goes to github.com

Skip to content

h3js/srvx

 
 

Repository files navigation

💥 srvx

npm version npm downloads

Universal Server API based on web platform standards. Works with Deno, Bun and Node.js.

Quick start

import { serve } from "srvx";

const server = serve({
  port: 3000,
  fetch(request) {
    return new Response("👋 Hello there!");
  },
});

👉 Visit the 📖 Documentation to learn more.

Examples

➤Online Playground

Example Source Try
h3 examples/h3 npx giget gh:h3js/srvx/examples/h3
hello-world examples/hello-world npx giget gh:h3js/srvx/examples/hello-world
hono examples/hono npx giget gh:h3js/srvx/examples/hono
websocket examples/websocket npx giget gh:h3js/srvx/examples/websocket

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

Published under the MIT license. Made by @pi0 and community 💛


🤖 auto updated with automd