Package Exports
- @hattip/adapter-netlify-functions
Readme
@hattip/adapter-netlify-functions
HatTip adapter for Netlify 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 netlifyFunctionsAdapter from "@hattip/adapter-netlify-functions";
import hattipHandler from "./handler.js";
export const handler = netlifyFunctionsAdapter(hattipHandler);fetch implementation
This adapter uses node-fetch as its fetch implementation.
context.passThrough behavior
Calling context.passThrough has no effect, the placeholder response will be returned.
context.platform
This adapter's platform context contains the event and context properties which have the types NetlifyFunctionEvent and NetlifyFunctionContext respectively.