Route RPC back-end API requests to the appropriate functions with context about authentication, the request itself and more.
import * from "@resistdesign/voltra/api";
export const handler = async (event: any): Promise<CloudFunctionResponse> => handleCloudFunctionEvent( event, AWS.normalizeCloudFunctionEvent, addRoutesToRouteMap({}, [ { path: "", authConfig: { anyAuthorized: true, }, handler: async () => 'WELCOME!!!!', } ]), [ process.env.CLIENT_ORIGIN as string, /https:\\/\\/example\\.com(:.*?$|\\/.*$|$)/gim, ] ); Copy
export const handler = async (event: any): Promise<CloudFunctionResponse> => handleCloudFunctionEvent( event, AWS.normalizeCloudFunctionEvent, addRoutesToRouteMap({}, [ { path: "", authConfig: { anyAuthorized: true, }, handler: async () => 'WELCOME!!!!', } ]), [ process.env.CLIENT_ORIGIN as string, /https:\\/\\/example\\.com(:.*?$|\\/.*$|$)/gim, ] );
Route RPC back-end API requests to the appropriate functions with context about authentication, the request itself and more.
Usage
import * from "@resistdesign/voltra/api";
Example