1.0.2-10 • Published 11 months ago

node-edge-runtime v1.0.2-10

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Edge Runtime Adapter for Node.js

⚠️ Deprecated.

Use npmjs.com/package/node-edge-server instead.


Sharing the same code between node and other edge runtimes (Deno, Cloudflare workers, Bun, ...)

import { serve } from 'node-edge-runtime'

serve({
  fetch: mainFetch,
  port: 3000, // Port number, default is 3000
})

async function mainFetch(req: Request) {
  const u = new URL(req.url)
  return new Response(u.toString())
}

Support both CommonJS and ESM.

View code: npmjs.com/package/node-edge-runtime?activeTab=code

Original Author

Yusuke Wada https://github.com/yusukebe

License

MIT

1.0.2-10

11 months ago

2.0.0-beta.3

11 months ago

2.0.0-beta.2

11 months ago

2.0.0-beta.1

11 months ago

1.0.2-9

11 months ago

1.0.2-8

11 months ago

1.0.2-7

11 months ago

1.0.2-6

11 months ago

1.0.2-5

11 months ago

1.0.2-4

11 months ago

1.0.2-3

11 months ago

1.0.2-2

11 months ago

1.0.2-1

11 months ago

1.0.2

11 months ago