New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

aws-lambda-http-server

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


Version published
Weekly downloads
22
decreased by-4.35%
Maintainers
1
Weekly downloads
 
Created

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

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