Serverless API 模板生成器,用于服务端 Swift。
Breeze 是一款强大的工具,旨在简化使用 Swift 创建 Serverless API 模板的过程。
它消除了从零开始设置项目的复杂性,为开发者提供了可调整和自定义的代码、脚本和配置。该工具基于开源代码,允许任何人检查、理解和改进其实现。
Breeze 的基本选择
Serverless 架构彻底改变了开发者处理应用部署的方式。Serverless 计算消除了与传统服务器管理相关的复杂性。这种方法提高了敏捷性,减少了运营开销,增强了可扩展性,并实现了高效的资源利用。
Swift 简洁的语法、强大的类型系统和性能优化有助于加快开发周期并增强代码可维护性。在服务端利用 Swift 确保了开发者获得一致且统一的语言体验,促进了客户端和服务器组件之间的代码共享。
该工具可以生成以下可用模板
基于 APIGateway、Lambda、DynamoDB 的 AWS Serverless REST API
命令行帮助:swift run breeze generate-lambda-api --help
Talk @NSLondon: Serverless in Swift like a Breeze](https://youtu.be/D4qSv_fhQIo?si=WnsTlYbUjHs9DYHF)
幻灯片:Slides
基于 APIGateway 和 Lambda 的 GitHub Webhook,带有签名验证。
命令行帮助:swift run breeze generate-github-webhook --help
基于 APIGateway 和 Lambda 的 Serverless Webhook,带有 POST 和 GET 端点。
命令行帮助:swift run breeze generate-webhook --help
swift run breeze --help
输出
OVERVIEW: Breeze command line
Generate the deployment of a Serverless project using Breeze.
The command generates of the swift package, the `serverless.yml` file and the relevant commands in the target path to deploy
the Lambda code on AWS using the Serverless Framework.
USAGE: breeze <subcommand>
OPTIONS:
-h, --help Show help information.
SUBCOMMANDS:
generate-lambda-api
generate-github-webhook
generate-webhook
See 'breeze help <subcommand>' for detailed help.
使用 Breeze 开发 Serverless Swift 的工作流可以通过以下步骤描述
breeze
命令行工具生成项目build.sh
脚本构建项目deploy.sh
脚本部署项目update.sh
脚本更新项目remove.sh
脚本移除项目make
欢迎贡献!如果您遇到任何问题或有改进的想法,请开启 issue 或提交 pull request。