Skip to content

matthewmueller/lambda-serve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Use koa or express on lambda!

Resources

Stars

Watchers

Forks

Packages

No packages published