当前位置: 首页 > 软件库 > Web应用开发 > Web框架 >

aws-serverless-koa

授权协议 MIT License
开发语言 JavaScript
所属分类 Web应用开发、 Web框架
软件类型 开源软件
地区 不详
投 递 者 戚京
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

aws-serverless-koa

This library enables you to utilize AWS Lambda and Amazon API Gateway to respond to web and API requests using the Koa.js application framework

Installation

$ npm install --save aws-serverless-koa

Usage

const Koa = require('koa');
const serverless = require('aws-serverless-koa');

const app = new Koa();

app.use(async ctx => {
  ctx.body = 'Hello, world!';
});

module.exports.handler = serverless(app);

Middleware

This package includes middleware to easily get the event object Lambda receives from API Gateway (based on aws-serverless-express/middleware):

const awsServerlessKoaMiddleware = require('aws-serverless-koa/middleware');
app.use(awsServerlessKoaMiddleware());
app.use(ctx => {
  ctx.body = ctx.apiGateway.event
});

License

MIT license

 相关资料
  • Wild Rydes Serverless Workshops This repository contains a collection of workshops and other hands on content that will guide you through building various serverless applications using AWS Lambda, Ama

  • AWS Serverless Airline Booking Serverless Airline Booking is a complete web application that provides Flight Search, Payment, Booking and Loyalty points including end-to-end testing, GraphQL and CI/CD

  • Serverless Java container The aws-serverless-java-container makes it easy to run Java applications written with frameworks such as Spring, Spring Boot, Apache Struts, Jersey, or Spark in AWS Lambda. S

  • AWS Serverless Ecommerce Platform Status: Work-in-progress. Please create issues or pull requests if you have ideas for improvement. The Serverless Ecommerce Platform is a sample implementation of a s

  • Serverless AWS Alerts Plugin A Serverless plugin to easily add CloudWatch alarms to functions Installation npm i serverless-plugin-aws-alertsORyarn add --dev serverless-plugin-aws-alerts Usage Basic U

  • SpaceFinder - Serverless Auth Reference App SpaceFinder is a reference mobile app that allows users to book conference rooms, work desks, and other shared resources. The app showcases serverless authe