项目作者: lbrdev

项目描述 :
Tool to import JSON files in Google's Firestore.
高级语言: JavaScript
项目地址: git://github.com/lbrdev/FirestoreImporter.git
创建时间: 2020-02-01T11:17:21Z
项目社区:https://github.com/lbrdev/FirestoreImporter

开源协议:MIT License

下载


DB Importer

How to use

  1. Add web project configuration in Firebase console. Generate configuration and replace in config.js. Open settings and create service account, download configuration and replace in serviceAccount.json.
  2. Convert .csv file into JSON using this link - (CSV to JSON - CSVJSON)
  3. Copy JSON data into file (example.json).
  4. Save file
  5. Check access rules at Firestore. If collection that you need to update has allow read: if request.auth.uid != null change it to allow read, write and publish. ~Don’t forget to revert it back.~
  6. Delete collection in Firestore
  7. Open terminal and run
    1. node import_*collection*.js

Contacts

lbrdev.contact@gmail.com