Skip to content

dinko7/dartblaze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dartblaze

Dartblaze allows you to write Firebase Cloud Functions in pure Dart, bringing type safety, language, ecosystem, and packages you already know and love from Flutter to the backend.

Warning

Dartblaze is not production ready yet. Please use this with caution and don't deploy on production environments.

Packages

Installation

See docs to install the CLI and get started.

Usage

Write your cloud functions using the same syntax as in Node:

@OnDocumentCreated('todos/{todoId}')
Future<void> oncreatetodo(
  DocumentSnapshot snapshot,
  RequestContext context,
  {required String todoId}
) async {
  final data = snapshot.data();
  final title = data?['title'] as String?;
  await snapshot.ref.update({'title': '$title from server!'});
}

Then, run the generator dart run build_runner build --delete-conflicting-output to generate the necessary code.

Finally, deploy using the CLI:

dartblaze deploy <function_name> --region=<region>

See docs for more info.

About

Write Firebase Cloud Functions in Dart

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages