Giter Site home page Giter Site logo

misterjimson / functions-framework-dart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlecloudplatform/functions-framework-dart

0.0 2.0 0.0 660 KB

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

Home Page: https://pub.dev/packages/functions_framework

License: Apache License 2.0

Dockerfile 0.95% Dart 97.11% Shell 1.39% Makefile 0.56%

functions-framework-dart's Introduction

Functions Framework for Dart

DISCLAIMER: This is not ready for production. Expect breaking changes. We're sharing our progress with the developer community and appreciate your feedback. Feel free to start a discussion to share thoughts or open issues for bugs.

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:

Google Cloud Functions does not currently provide an officially supported Dart language runtime, but we're working to make running on Google Cloud Run as seamless and symmetric an experience as possible for your Dart Functions Framework projects.

The framework allows you to go from:

examples/hello/lib/functions.dart

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

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

To:

curl https://<your-app-url>
# Output: Hello, World!

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

See more demos under the examples directory.

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

Dart quickstart on your local machine.

$ cd examples/hello
$ docker build -t app .
...

$ docker run -it -p 8080:8080 --name demo --rm app
Listening on :8080

In another terminal...

$ curl localhost:8080
Hello, World!

See more quickstarts.

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

Apache 2.0; see LICENSE for details.

functions-framework-dart's People

Contributors

kevmoo avatar subfuzion avatar mit-mit avatar nickmeinhold avatar tahatesser avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.