pulyaevskiy / firebase-functions-interop

Firebase Functions Interop Library for Dart.
BSD 3-Clause "New" or "Revised" License
191 stars 52 forks source link

[Question \ Feature request] Make write to Firestore (Firebase-admin functions) #64

Closed AlexBacich closed 4 years ago

AlexBacich commented 4 years ago

Is there a way to read\write to Firestore database inside of HTTPS function?

From what I see in Cloud Functions specs - I need to run this in Node.JS:

const admin = require('firebase-admin'); admin.initializeApp(functions.config().firebase);

I'm not familiar with JS though so all my hope was on firebase-functions-interop plugin.

AlexBacich commented 4 years ago

Found it - it's already in package. All I need to do is to import: import 'package:firebase_admin_interop/firebase_admin_interop.dart';