@hattip/adapter-netlify-functions
TypeScript icon, indicating that this package has built-in type declarations

0.0.45 • Public • Published

@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

export interface NetlifyFunctionsPlatformInfo {
  name: "netlify-functions";
  event: NetlifyFunctionEvent;
  context: NetlifyFunctionContext;
}

Readme

Keywords

none

Package Sidebar

Install

npm i @hattip/adapter-netlify-functions

Weekly Downloads

88

Version

0.0.45

License

MIT

Unpacked Size

6.16 kB

Total Files

5

Last publish

Collaborators

  • cyco130