Comments (7)
https://firebase.google.com/docs/functions/config-env#automatically_populated_environment_variables
from opentrace-cloud-functions.
thanks mchmielarski
a follow up question to this, do i declare the FIREBASE_CONFIG and GCLOUD_PROJECT environment variables in the config.ts file located in \functions\src folder? sorry for my ignorance. since i am pretty new in this and not much documentation is included in the write up under https://github.com/opentrace-community/opentrace-cloud-functions#test.
Unfortunately, i need some help in this area everyone! Please be patient with me. I am only trying to do this because no one has the initiative in our country to do this to fight against covid.
not sure after the configuration where i will add those variables.
help.
from opentrace-cloud-functions.
this is the content of the config.ts
import FunctionConfig from "./opentrace/types/FunctionConfig";
import Authenticator from "./opentrace/utils/Authenticator";
import PinGenerator from "./opentrace/utils/PinGenerator";
const config: FunctionConfig = {
projectId: "tracetogether-philippines",
regions: ["asia-east2"],
utcOffset: 0,
authenticator: new Authenticator(),
encryption: {
defaultAlgorithm: "aes-256-gcm",
keyPath: "./credentials/testdev.json",
defaultVersion: 1,
},
tempID: {
validityPeriod: 0.25, // in hours
refreshInterval: 12, // in hours
batchSize: 100, // sufficient for 24h+
},
upload: {
pinGenerator: new PinGenerator(),
bucket: "upload-bucket-ttph", //
recordsDir: "records",
testsDir: "tests",
tokenValidityPeriod: 2, // in hours
bucketForArchive: "archive-bucket-ttph",
},
};
export default config;
from opentrace-cloud-functions.
or should i replace in the keypath the values :
projects/**************/secrets/TraceTogetherSecret
or
just the name TraceTogetherSecret
located in the google cloud under Secret Manager?
from opentrace-cloud-functions.
thanks for your patience
from opentrace-cloud-functions.
you can set env variables in many ways, but remember that it's only required by your local environment. so that easiest way is to add them before command which you try to run:
FIREBASE_CONFIG=... GCLOUD_PROJECT=... npm --prefix functions test
from opentrace-cloud-functions.
In our setup we don't use FIREBASE_CONFIG
and GCLOUD_PROJECT
.
@tophatxperts, did you set GOOGLE_APPLICATION_CREDENTIALS
variable to "C:\TraceTogether\functions\src\credentials\testdev.json"
? Do ensure that the file exists and is a valid GCP credential file.
And keyPath
should be set to TraceTogetherSecret
in your case.
from opentrace-cloud-functions.
Related Issues (20)
- how to implement processUploadedData HOT 1
- Testing without billing information HOT 1
- Analyst Uploaded data HOT 1
- How to get each unique Bluetooth ID HOT 1
- c
- Getting encryption key error HOT 1
- error: functions/lib/index.js does not exist, can't deploy Cloud Functions HOT 1
- Unhandled error { Error: 7 PERMISSION_DENIED: Missing or insufficient permissions. HOT 4
- Cloud Functions use-case? HOT 2
- getUploadToken: ERR_CRYPTO_INVALID_STATE HOT 7
- getEncryptionKeyTest { Error: 3 INVALID_ARGUMENT: Resource ID is not in a valid format HOT 4
- getUploadToken 401 HOT 8
- Error: firebase use must be run from a Firebase project directory. HOT 1
- NOT IDLE HOT 3
- error:- getting encryption key HOT 2
- processUploadedData: File is not streetPassRecords, ignore. HOT 5
- Error while decrypting temp ID. Unsupported state or unable to authenticate data" HOT 5
- How to get user geo localisation ?
- getUploadToken. Error: 9 FAILED_PRECONDITION
- GetTempsIDs: Error: 500
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opentrace-cloud-functions.