Git Product home page Git Product logo

firebase-commands's Introduction

Firebase scripts

How to run

  1. npm install
  2. start script file
npm start [scriptFileName]

npm start addBatchData.js

Scripts

addBatchData

  • Use this script when you need to batch lots of documents.
  1. Add .env file to configure settings
# See: https://firebase.google.com/docs/web/learn-more#config-object

FIREBASE_API_KEY='$YOUR_API_KEY$'
FIREBASE_AUTH_DOMAIN='$YOUR_PROJECT_ID$.firebaseapp.com'
FIREBASE_DATABASE_URL='https://$YOUR_PROJECT_ID$.firebaseio.com'
FIREBASE_PROJECT_ID='$YOUR_PROJECT_ID$'
FIREBASE_STORAGE_BUCKET='$YOUR_PROJECT_ID$.appspot.com'
FIREBASE_MESSAGING_SENDER_ID='$YOUR_SENDER_ID$'
FIREBASE_APP_ID='$YOUR_APP_ID$'
  1. Set your collection path
const path = 'products';
  1. Replace documents to your data
const documents = [
  { casNo: '1111', name: '1111', imageUrl: '', type: 'OLED' },
  { casNo: '2222', name: '2222', imageUrl: '', type: 'OLED' },
];

firebase-commands's People

Contributors

soojungchae avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.