functions_framework 0.4.0 copy "functions_framework: ^0.4.0" to clipboard
functions_framework: ^0.4.0 copied to clipboard

outdated

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

Functions Framework for Dart #

DISCLAIMER: this is not ready for production.

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.

Features #

  • Build your Function in the same container environment used by Cloud Functions using 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.

156
likes
0
pub points
88%
popularity

Publisher

verified publishercloud.google.com

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

args, collection, http, http_parser, io, json_annotation, meta, shelf, stack_trace

More

Packages that depend on functions_framework