Express
Express is a fast, unopinionated, minimalist web framework for Node.js.
Fetch handler
Section titled “Fetch handler”If you want to use Express with a fetch handler (like on Cloudflare, Netlify or Vercel), you will need to convert the Node handler to a fetch handler. We recommend srvx:
import type { ExportedHandler } from "@vite-deploy/netlify";import express from "express";import { toFetchHandler } from "srvx/node";
const app = express();
// ...
export default { fetch: toFetchHandler(app),} satisfies ExportedHandler;Node handler
Section titled “Node handler”Express is compatible out of the box with Node handlers:
import type { ExportedHandler } from "@vite-deploy/node";import express from "express";
const app = express();
// ...
export default { handler: app,} satisfies ExportedHandler;