Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FaaS (Function as a service) framework for writing portable Dart functions

License

Notifications You must be signed in to change notification settings

Botanium/functions-framework-dart

 
 

Repository files navigation

Functions Framework for Dart

DISCLAIMER: this is not ready for production, doen't support cloudevents yet, and doesn't have tests yet for Functions Framework Conformance.

Functions Framework Unit Tests Lint Test Conformance Tests
Dart

An open source FaaS (Function as a Service) framework for writing portable Dart functions, brought to you by the Google Dart and Cloud Functions teams.

The Functions Framework lets you write lightweight functions that run in many different environments, including:

The framework allows you to go from:

import 'package:functions_framework/functions_framework.dart';
import 'package:shelf/shelf.dart';

@CloudFunction()
Response handleGet(Request request) => Response.ok('Hello, World!');

To:

curl http://my-url
# Output: Hello, World!

All without needing to worry about writing an HTTP server or request handling logic.

See the Hello, World! demo in the examples/hello directory.

Features

  • Build your Function in the same container environment used by Cloud Functions using [buildpacks](https://github. com/GoogleCloudPlatform/buildpacks).
  • Invoke a function in response to a request
  • Automatically unmarshal events conforming to the CloudEvents spec
  • Portable between serverless platforms

Quickstart: Hello, World on your local machine

$ docker build -t app .
...

$ docker run -it -p 8080:8080 --name demo app
App listening on :8080

In another terminal...

$ curl localhost:8080
Hello, World!

Contributing changes

See CONTRIBUTING.md for details on how to contribute to this project, including how to build and test your changes as well as how to properly format your code.

Licensing

BSD 3-Clause License. See LICENSE for details.

About

FaaS (Function as a service) framework for writing portable Dart functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 77.5%
  • Shell 17.0%
  • Dockerfile 5.5%