从 Cloud Function 内部连接到 Cloud Firestore 的样板代码是什么?

What is a boilerplate code for connecting to Cloud Firestore from within Cloud Function?

我正在寻找 index.js 和 package.json 的样板代码片段,以便通过简单的 [=14] 从我的 Node.js 云函数连接到同一项目下的 Cloud Firestore 数据库=] 以请求为例。

ps 我正在使用 Cloud Functions 内联编辑器。

发布 link 来自对我有帮助的评论之一。

Initialize Cloud Firestore