This package has been deprecated

Author message:

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

node-edge-runtime
TypeScript icon, indicating that this package has built-in type declarations

1.0.2-10 • Public • Published

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

/node-edge-runtime/

    Package Sidebar

    Install

    npm i node-edge-runtime

    Weekly Downloads

    0

    Version

    1.0.2-10

    License

    MIT

    Unpacked Size

    20.1 kB

    Total Files

    23

    Last publish

    Collaborators

    • reeganexe