Hattip adapter for Netlify Functions.
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 netlifyFunctionsAdapter from "@hattip/adapter-netlify-functions";
import hattipHandler from "./handler.js";
export const handler = netlifyFunctionsAdapter(hattipHandler);
This adapter uses node-fetch
as its fetch
implementation.
Calling context.passThrough
has no effect, the placeholder response will be returned.
export interface NetlifyFunctionsPlatformInfo {
name: "netlify-functions";
event: NetlifyFunctionEvent;
context: NetlifyFunctionContext;
}