🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

aws-lambda-http-server

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-lambda-http-server

run http server as aws lambda function

0.2.7
latest
Source
npm
Version published
Maintainers
1
Created
Source

aws-lambda-http-server

Call your http server stack code using an in memory http listener. No sockets needed.

js-standard-style build status downloads

Should work with any http framework.

Tests include the following http frameworks.

server.js

require('http').createServer((req, res) => {
  if (req.url === '/hello') return res.end('world')
})
.listen(5000)

aws-lambda.js

exports.proxy = require('aws-lambda-http-server')
require('./server.js')

serverless.yml example

service: test
provider:
  name: aws
  runtime: nodejs12.x
  region: eu-west-1
functions:
  proxy:
    handler: aws-lambda.proxy
    events:
      - http:
          path: /{proxy+}
          method: any
      - http:
          path: ''
          method: any

license

Apache License, Version 2.0

Keywords

aws-lambda

FAQs

Package last updated on 14 Dec 2020

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