简体   繁体   English

使用Node.js和Firebase / Firestore创建Webapp

[英]Creating webapp with Node.js and Firebase/Firestore

I've built an iOS/firestore app. 我已经建立了一个iOS / firestore应用。 I'm now looking to create a web app to integrate with my database. 我现在正在寻找创建一个与数据库集成的Web应用程序。 I was going through the documentation and found a distinction between firebase for Node.js ( https://firebase.google.com/docs/web/setup ) and firebase firebase admin SDK ( https://firebase.google.com/docs/admin/setup ). 我正在浏览文档,发现在Node.js的firebase( https://firebase.google.com/docs/web/setup )和firebase firebase管理员SDK( https://firebase.google.com/docs )之间有区别/ admin / setup )。

I believe that I will want admin privileges and control over the web app but since I'm learning this for the first time should I focus on the basics of getting user auth, access to the database, storage and cloud functions working? 我相信我将需要管理员特权和对Web应用程序的控制权,但是由于这是我第一次学习该知识,因此我应该专注于获得用户身份验证,访问数据库,存储和云功能的基础知识吗? Or will be changing/adding the admin privileges down the line be such a hassle that it's better to struggle through it now? 还是会更改/添加管理员权限这么麻烦,最好现在就解决它?

I'm still new to the web side of firebase and I'm trying to get a feel for the approach I should take. 我仍然对Firebase的网络方面还很陌生,我正在尝试了解应该采用的方法。

If you're building a web interface for your app, I'd encourage you to use the Firebase JS SDK and do most of the work client-side. 如果您要为应用程序构建Web界面,建议您使用Firebase JS SDK并执行客户端的大部分工作。 It should be pretty similar to what you've already done in iOS. 它应该与您在iOS中已经完成的工作非常相似。

You should only use the Admin SDK if you're specifically trying to create endpoints with custom trusted functionality that isn't available by using the normal SDKs. 仅当您要尝试创建具有自定义受信任功能的终结点时才应使用Admin SDK,而使用常规SDK则无法提供这些功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM