How to use the serverless-aws-static-file-handler function in serverless-aws-static-file-handler

To help you get started, we’ve selected a few serverless-aws-static-file-handler examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github josephluck / internote / ui / service-worker / lambda.ts View on Github external
import StaticFileHandler from "serverless-aws-static-file-handler";
import * as path from "path";

const clientFilesPath = path.join(__dirname, "../.service-worker/");
const fileHandler = new StaticFileHandler(clientFilesPath);

export const handler = async (event, context) => {
  return fileHandler.get(event, context);
};

serverless-aws-static-file-handler

Easily serve static files with the Serverless Framework on AWS Lambda.

MIT
Latest version published 5 months ago

Package Health Score

75 / 100
Full package analysis

Popular serverless-aws-static-file-handler functions