@scandinavianairlines/remix-azure-functions
Version:
A package that adapts requests between Azure Functions and Remix.run
17 lines • 1.29 kB
TypeScript
/**
* Returns a request handler for Azure Function that serves the response using Remix.
* @param {object} options The options object.
* @param {import('@remix-run/node').ServerBuild | (() => Promise<import('@remix-run/node').ServerBuild>)} options.build The Remix server build.
* @param {GetLoadContextFn} [options.getLoadContext] A function that returns the Remix load context.
* @param {(request: import('@azure/functions').HttpRequest) => URL} [options.urlParser] A function that parses the incoming request to a URL object.
* @param {string} [options.mode] The mode of the Remix server build. Defaults to `process.env.NODE_ENV`.
* @returns {import('@azure/functions').HttpHandler} A Azure function handler.
*/
export function createRequestHandler(options: {
build: import("@remix-run/node").ServerBuild | (() => Promise<import("@remix-run/node").ServerBuild>);
getLoadContext?: GetLoadContextFn | undefined;
urlParser?: ((request: import("@azure/functions").HttpRequest) => URL) | undefined;
mode?: string | undefined;
}): import("@azure/functions").HttpHandler;
export type GetLoadContextFn = (request: Request, context: import("@azure/functions").InvocationContext) => Promise<import("@remix-run/node").AppLoadContext>;
//# sourceMappingURL=server.d.ts.map