netlify-edge-functions

Installation
SKILL.md

Netlify Edge Functions

Use this form

// netlify/edge-functions/hello.ts
import type { Config, Context } from "@netlify/edge-functions";

export default async (request: Request, context: Context) => {
  return new Response(`Hello from ${context.geo.country?.name ?? "somewhere"}`);
};

export const config: Config = { path: "/hello" };
  • One file = one function: a default-export handler plus a config export with the route. Alternatively, declare the route in netlify.toml.
  • Request and Response are global. Import Context and Config types from @netlify/edge-functions.
  • Read env vars with Netlify.env.get(). process.env works only for Next.js middleware.
Installs
3.0K
GitHub Stars
41
First Seen
Feb 27, 2026