Netlify
Netlify gives you two runtime options for an API: Edge Functions (Deno-based, global) and Functions v2 (Node, fetch-style). Both speak the web-standard Request → Responsecontract, so the DaloyJS adapter is the same helper in both places — only the file location and the optional config export change.
When to choose Netlify
- You want a platform-managed REST API with Edge or Node function options.
- You want preview deploys per branch with zero config.
- You're fine with platform-managed cold starts.
Netlify Edge Functions (Deno)
Edge Functions run on a Deno-based runtime. Use toWebHandler— the same helper as the Vercel Edge adapter, because the input/output shape is identical.
Netlify Functions v2 (Node, fetch-style)
Functions v2 is GA and is the recommended way to write Node functions on Netlify. The old v1 lambda-style handler (exports.handler = (event, context) => ...) is legacy — it still works for compatibility but you should write new code in v2.
If you have an existing v1 codebase you can't migrate yet, the Lambda adapter still works against the v1 event shape:
netlify.toml
For a REST-API-only project there is no static site to publish. Omit the publishkey (or point it at an empty directory) so Netlify doesn't try to serve your compiled server code as static files.
Deploy
Gotchas
- Edge Functions don't expose
node:*— same caveat as Vercel Edge and Cloudflare Workers. - Functions v2 returns a
Responsedirectly. Don't use the v1statusCode/bodyobject shape in v2 code. context.waitUntilis available in v2 for fire-and-forget work.