1
0
Fork 0
mirror of synced 2024-06-02 02:25:17 +12:00

Analytics enabled/disabled via specific ENV variable

This commit is contained in:
Michael Shanks 2020-09-29 17:28:24 +01:00
parent a665399785
commit f97369afd2
3 changed files with 4 additions and 2 deletions

View file

@ -14,6 +14,7 @@ rimraf.sync(homedir)
process.env.BUDIBASE_API_KEY = "6BE826CB-6B30-4AEC-8777-2E90464633DE"
process.env.NODE_ENV = "cypress"
process.env.ENABLE_ANALYTICS = "false"
initialiseBudibase({ dir: homedir, clientId: "cypress-test" })
.then(() => {

View file

@ -16,4 +16,5 @@ LOG_LEVEL=error
DEPLOYMENT_CREDENTIALS_URL="https://dt4mpwwap8.execute-api.eu-west-1.amazonaws.com/prod/"
DEPLOYMENT_DB_URL="https://couchdb.budi.live:5984"
SENTRY_DSN=https://a34ae347621946bf8acded18e5b7d4b8@o420233.ingest.sentry.io/5338131
SENTRY_DSN=https://a34ae347621946bf8acded18e5b7d4b8@o420233.ingest.sentry.io/5338131
ENABLE_ANALYTICS="true"

View file

@ -1,3 +1,3 @@
exports.isEnabled = async function(ctx) {
ctx.body = JSON.stringify(process.env.NODE_ENV === "production")
ctx.body = JSON.stringify(process.env.ENABLE_ANALYTICS === "true")
}