-
Notifications
You must be signed in to change notification settings - Fork 0
Firebase info
Mats Tyldum edited this page Mar 9, 2021
·
3 revisions
- To test, develop and manage Firebase functions you need to install
firebase-tools
on your device:
npm install -g firebase-tools
To login using Google run the following command in your terminal:
firebase login
Variables can be found at in the Heroku dashboard
firebase functions:config:set hasura.graphql_api="YOUR_GraphQL_API" hasura.graphql_admin_secret="ADMIN_SECRET"
Or
firebase functions:config:get > .runtimeconfig.json
Download the schema file
gq https://hover-server.herokuapp.com/v1/graphql --header "X-Hasura-Admin-Secret: ADMIN_SECRET" --introspect > schema.graphql
Then generate using
npm run generate
Check that your code runs
npm run serve
The command wil serve all functions locally, and each can be tested using tool such as Postman. When the functions are ready for deployment, run:
npm run deploy
Created by Mats Tyldum and Siri Mykland