Coder Social home page Coder Social logo

survey-app-backend's Introduction

說明

cloud storage 設定

  • cloud storage 預設會有網域的限制,所以要:

    1. 創立 cors.json,並輸入:
      [
        {
          "origin": ["*"],
          "method": ["GET"],
          "maxAgeSeconds": 3600
        }
      ]
    2. 送出指令 gsutil cors set cors.json gs://{你的bucket名稱}/
  • Rules 設定:

    1. 初始化 Firebase storage 時會自動創立 storage.rules
    2. 編輯後送出指令 firebase deploy --only storage

Firestore 設定

  • Rules 設定:

    1. 初始化 Firebase firestore 時會自動創立 firestore.rules
    2. 編輯後送出指令 firebase deploy --only firestore

注意事項

  • 有關 Firebase 的設定需先 cd 進 firebase 資料夾
  • 若出現錯誤:"firebase cannot be loaded because running scripts is disabled on this system."
    • 則先送出指令 Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

Firestore batch

  • batch.commit() 的 task 數量不能超過 500,而且可能有 bug,因此自己寫了一個 Batch 來處理

survey-app-backend's People

Contributors

yun-cheng avatar

Watchers

 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.