1.0.2-10 • Published 2 years ago

node-edge-runtime v1.0.2-10

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

2.0.0-beta.3

2 years ago

2.0.0-beta.2

2 years ago

2.0.0-beta.1

2 years ago

1.0.2-9

2 years ago

1.0.2-8

2 years ago

1.0.2-7

2 years ago

1.0.2-6

2 years ago

1.0.2-5

2 years ago

1.0.2-4

2 years ago

1.0.2-3

2 years ago

1.0.2-2

2 years ago

1.0.2-1

2 years ago

1.0.2

2 years ago