aws-lambda-http-server
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/aws-lambda-http-server package

    0.2.7 • Public • Published

    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

    Install

    npm i aws-lambda-http-server

    DownloadsWeekly Downloads

    15

    Version

    0.2.7

    License

    Apache-2.0

    Unpacked Size

    25.6 kB

    Total Files

    4

    Last publish

    Collaborators

    • jameskyburz