Skip to content

amondnet/serverless-dart

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ 🎯

serverless-dart

A ⚑ Serverless framework ⚑ plugin for Dart applications


πŸ“¦ Install

Install the plugin inside your serverless project with npm.

$ npm i -D @amondnet/serverless-dart@0.0.2-beta.9

πŸ’‘ The -D flag adds it to your development dependencies in npm speak

πŸ’‘ This plugin assumes you are using Dart Runtime for AWS Lambda coding your applications.

Add the following to your serverless project's serverless.yml file

service: hello
provider:
  name: aws
  runtime: dart
plugins:
  # this registers the plugin
  # with serverless
  - '@amondnet/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 dart2native builds 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.

🀸 Usage

Every serverless workflow command should work out of the box.

package your Lambdas

$ npx serverless deploy

deploy your Lambdas

$ npx serverless deploy

πŸ‘¨β€πŸ’» Development

Clone the repository

$ git clone https://github.com/katallaxie/serverless-dart

Link the package

$ npm link

Link the package to your testing environment

$ npm link serverless-dart

πŸ“ƒ License

Apache 2.0

We πŸ’™ Dart.

About

⚑ 🎯 a serverless framework plugin for Dart applications

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 85.9%
  • JavaScript 14.1%