Giter VIP home page Giter VIP logo

hihihihi's Introduction

app-name

Application tag line describe here

Preparation

Installation

  • Choose a project staging for Firebase application
firebase use --add
  • Configure all settings for Firebase development environment by create a new file .runtimeconfig.json
{
  "shopify": {
    "api_key": "<Shopify API Key>",
    "secret": "<Shopify Secret>",
    "firebase_api_key": "<Firebase API Key>"
  }
}
SHOPIFY_API_KEY=<Insert here>
FIREBASE_API_KEY=<Insert here>
FIREBASE_AUTH_DOMAIN=<Insert here>
FIREBASE_PROJECT_ID=<Insert here>
FIREBASE_STORAGE_BUCKET=<Insert here>
FIREBASE_APP_ID=<Insert here>
FIREBASE_MEASUREMENT_ID=<Insert here>
  • Create an empty Firestore database
  • Deploy the Firestore default indexes
firebase deploy --only firestore

Development

  • To start to develop, please run 2 below commands
npm run start-dev
GOOGLE_APPLICATION_CREDENTIALS=<Path to service-account.json> firebase serve

Lint

  • All your files must be passed ESLint:

To setup a git hook before committing to Gitlab, please run:

cp git-hooks/pre-commit .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit

Where you can see all function logs

  • You can see all logs from your functions by follow commands
firebase functions:log
  • You also view in Web interface by access

View all logs from Firebase web interface

Common issues

  • When you try, it can throw an error like that

Content Security Policy Error

Solution

Install Disable Content-Security-Policy (CSP) to disable CSP in Chromium browers

  • I got message: Unauthorized after authentication

Solution

Go https://console.firebase.google.com/u/0/project/{project-id}/settings/serviceaccounts/adminsdk

Click Generate new private key

Use command to export global environment

export GOOGLE_APPLICATION_CREDENTIALS=<Path to service-account.json>
  • Permission issue

** Solution **

Enable permission Service Account Token Creator for [email protected]

Enable Permission for appspot

  • I can't see FIREBASE_MEASUREMENT_ID in Firebase project

** Solution **

You can enable Analytics for your project from Firebase project

Enable Google Analytics on your app

TODO

  • Add testing
  • CI/CD
  • Add document

hihihihi's People

Contributors

dht-uri 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.