lambda-serve

1.0.1 • Public • Published

lambda-serve

Use koa or express on lambda! This is just a simple wrapper around aws-serverless-express

Installation

npm install lambda-serve

Koa example

const Serve = require('lambda-serve')
const koa = require('koa')
const app = koa()

/**
 * Add proxy support
 */

app.proxy = true

/**
 * Run
 */

exports.default = Serve(app.callback())

/**
 * Respond to requests
 */

app.use(function * () {
  this.body = this.ip
})

Setup

Follow https://github.com/awslabs/aws-serverless-express#steps-for-running-the-example to get started.

Package Sidebar

Install

npm i lambda-serve

Weekly Downloads

34

Version

1.0.1

License

none

Last publish

Collaborators

  • mattmueller