Skip to content

Latest commit

 

History

History
 
 

adapter-netlify-edge

@hattip/adapter-netlify-edge

Hattip adapter for Netlify Edge Functions.

Usage

Assuming you have your Hattip handler defined in handler.js, create an entry file like the following and use @hattip/bundler-netlify or your favorite bundler to bundle it:

import netlifyEdgeAdapter from "@hattip/adapter-netlify-edge";
import handler from "./handler.js";

export default netlifyEdgeAdapter(handler);

context.platform

interface NetlifyEdgePlatformInfo {
  /** Platform name */
  name: "netlify-edge";
  /** Netlify-specific context object */
  context: NetlifyContext;
}

See Netlify's documentation for the Netlify-specific context object.