Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lambda-request-handler

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lambda-request-handler

[![Build Status](https://travis-ci.org/janaz/lambda-request-handler.svg?branch=master)](https://travis-ci.org/janaz/lambda-request-handler)

  • 0.0.1-beta.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

lambda-request-handler

Build Status

An npm module that allows your Express.js or Connect web applications to be deployed as an AWS Lambda function

Inspired by aws-serverless-express

Usage

The default export of lambda-request-handler is a function that takes an application handler (i.e. Express.js app instance) as an argument and returns an AWS Lambda handler function.

npm install lambda-request-handler
const express = require('express')
const lambdaRequestHandler = require('lambda-request-handler')

cont app = express()

app.get('/user/:id', (req, res) => {
  res.json({
    id: req.params.id,
    name: 'John'
  })
})

const handler = lambdaRequestHandler(app);

module.exports = { handler }

If the above file in your Lambda source was called index.js then the name of the handler in the Lambda configuration is index.handler

FAQs

Package last updated on 29 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc