Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/katallaxie/serverless-dart
⚡ 🎯 a serverless framework plugin for Dart applications
https://github.com/katallaxie/serverless-dart
aws dart lambda serverless
Last synced: 5 days ago
JSON representation
⚡ 🎯 a serverless framework plugin for Dart applications
- Host: GitHub
- URL: https://github.com/katallaxie/serverless-dart
- Owner: katallaxie
- License: mit
- Created: 2020-08-27T07:31:11.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T15:06:13.000Z (over 1 year ago)
- Last Synced: 2024-10-30T05:26:49.356Z (10 days ago)
- Topics: aws, dart, lambda, serverless
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/serverless-dart
- Size: 405 KB
- Stars: 29
- Watchers: 5
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
⚡ 🎯
serverless-dart
A ⚡ Serverless framework ⚡ plugin for Dart applications
## 📦 Install
Install the plugin inside your serverless project with npm.
```sh
$ npm i -D serverless-dart
```💡 The `-D` flag adds it to your development dependencies in npm speak
💡 This plugin assumes you are using [Dart Runtime for AWS Lambda](https://github.com/awslabs/aws-lambda-dart-runtime) coding your applications.
Add the following to your serverless project's `serverless.yml` file
```yaml
service: hello
provider:
name: aws
runtime: dart
plugins:
# this registers the plugin
# with serverless
- serverless-dart
# creates one artifact for each function
package:
individually: true
functions:
hello:
# the first part of the handler refers to the script lib/main.dart.
# main.hello identifies the handler to execute in the Dart runtime.
# The runtime supports multiple handlers
# The plugin is smart to not rebuild those scripts with multiple handlers.
handler: main.hello
events:
- http:
path: /hello
method: GET
```> 💡 The Dart Runtime for AWS Lambda requires a binary named `bootstrap`. This plugin renames the binary that is generated to `bootstrap` for you and zips that file.
The default behavior is to build your Lambda inside a Docker container. Make sure you [get Docker](https://docs.docker.com/get-docker/).
## 🤸 Usage
Every [serverless workflow command](https://serverless.com/framework/docs/providers/aws/guide/workflow/) should work out of the box.
### package your Lambdas
```sh
$ npx serverless deploy
```### deploy your Lambdas
```sh
$ npx serverless deploy
```## 👨💻 Development
Clone the repository
```bash
$ git clone https://github.com/katallaxie/serverless-dart
```Link the package
```bash
$ npm link
```Link the package to your testing environment
```bash
$ npm link serverless-dart
```## 📃 License
[Apache 2.0](/LICENSE)
We :blue_heart: Dart.