Apache License 2.0

项目介绍

CodeGenieApp/serverless-express 是一个托管在 GitHub 上的开源项目,主要使用 JavaScript 编写,采用 Apache License 2.0 许可证,目前获得 5.3k 个 Star、654 次 Fork。

仓库全名
CodeGenieApp/serverless-express
开源许可证
Apache License 2.0
Star 数
5.3k
Fork 数
654
未关闭 Issue
100

README 摘要

AWS Serverless Express is moving On 11/30, the AWS Serverless Express library is moving to Vendia and will be rebranded to @vendia/serverless-express. Similarly, the aws-serverless-express NPM package will be deprecated in favor of @vendia/serverless-express. Brett, the original creator of the Serverless Express library, will continue maintaining the repository and give it the attention and care it deserves. At the…

完整内容见 GitHub 原始 README 或本页 。

常见问题

serverless-express 用什么语言开发?

主要使用 JavaScript 编写,采用 Apache License 2.0 许可证,目前有 5.3k 个 Star。

serverless-express 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 serverless-express 的源码?

可以直接克隆仓库:git clone https://github.com/CodeGenieApp/serverless-express.git,默认分支为 mainline;安装与运行步骤见仓库 README。

serverless-express 最近还在维护吗?

仓库最近一次更新为 4月16日,当前有 100 个未关闭 Issue;Star 数为 5.3k,可作为社区活跃度的参考。

简要分析

热度分
6669
价值分
3357
活跃状态
活跃

语言占比

EJS
JavaScript
Shell

Release

README

AWS Serverless Express is moving

On 11/30, the AWS Serverless Express library is moving to Vendia and will be rebranded to @vendia/serverless-express. Similarly, the aws-serverless-express NPM package will be deprecated in favor of @vendia/serverless-express.

Brett, the original creator of the Serverless Express library, will continue maintaining the repository and give it the attention and care it deserves. At the same time, we will be looking for additional contributors to participate in the development and stewardship of the Serverless Express library. AWS and the SAM team will remain involved in an administrative role alongside Vendia, Brett, and the new maintainers that will join the project.

We believe this is the best course of action to ensure that customers using this library get the best possible support in the future. To learn more about this move or become a maintainer of the new Serverless Express library, reach out to us through a GitHub issue on this repository.

Best, The AWS Serverless team, Brett & the Vendia team


Serverless Express

npm npm dependencies Status devDependencies Status Contributor Covenant

Run serverless applications and REST APIs using your existing Node.js application framework, on top of AWS Lambda and Amazon API Gateway. The sample provided allows you to easily build serverless web applications/services and RESTful APIs using the Express framework.

Getting Started

npm install @vendia/serverless-express
// lambda.js
'use strict'
const serverlessExpress = require('@vendia/serverless-express')
const app = require('./app')
const server = serverlessExpress.createServer(app)

exports.handler = (event, context) => { serverlessExpress.proxy(server, event, context) }

Package and create your Lambda function, then configure a simple proxy API using Amazon API Gateway and integrate it with your Lambda function.

Quick Start/Example

Want to get up and running quickly? Check out our basic starter example which includes:

Getting the API Gateway event object

This package includes middleware to easily get the event object Lambda receives from API Gateway

const serverlessExpressMiddleware = require('@vendia/serverless-express/middleware')
app.use(serverlessExpressMiddleware.eventContext())
app.get('/', (req, res) => {
  res.json(req.apiGateway.event)
})

Is AWS serverless right for my app?

Benefits
Considerations
  • For apps that may not see traffic for several minutes at a time, you could see cold starts
  • Cannot use native libraries (aka Addons) unless you package your app on an EC2 machine running Amazon Linux
  • Stateless only
  • API Gateway has a timeout of 29 seconds, and Lambda has a maximum execution time of 15 minutes.

评论

暂无评论