Application tag line describe here
-
A Firebase project
-
A Shopify app in partner account
- Choose a project staging for Firebase application
firebase use --add
- Configure all settings for Firebase development environment by create a new file
.runtimeconfig.json
inside thepackages/functions
{
"shopify": {
"api_key": "<Shopify API Key>",
"secret": "<Shopify Secret>",
"firebase_api_key": "<Firebase API Key>"
},
"app": {
"base_url": ""
}
}
- Create a file
.env.development
with content in packages/assets
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
- To start to develop, please run 2 below commands
npm run start-dev
GOOGLE_APPLICATION_CREDENTIALS=<Path to service-account.json> firebase serve
- 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
- You can see all logs from your functions by follow commands
firebase functions:log
- You also view in Web interface by access
Solution
Install Disable Content-Security-Policy (CSP) to disable CSP in Chromium browers
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>
Solution
Enable permission Service Account Token Creator
for user@appspot.gserviceaccount.com
Solution
You can enable Analytics for your project from Firebase project
- Add testing
- CI/CD
- Add document