Add opt-out backend telemetry and fix dev compose frontend envars

This commit is contained in:
Tuan Dang
2022-11-23 19:25:48 -05:00
parent b0eff2a9d3
commit 7e4b38a2f1
7 changed files with 47 additions and 22 deletions
+8 -1
View File
@@ -6,7 +6,8 @@ import mongoose from 'mongoose';
import dotenv from 'dotenv';
dotenv.config();
import * as Sentry from '@sentry/node';
import { PORT, SENTRY_DSN, NODE_ENV, MONGO_URL, SITE_URL } from './config';
// import { PostHogClient } from './services';
import { PORT, SENTRY_DSN, NODE_ENV, MONGO_URL, SITE_URL, POSTHOG_PROJECT_API_KEY, POSTHOG_HOST, TELEMETRY_ENABLED } from './config';
import { apiLimiter } from './helpers/rateLimiter';
const app = express();
@@ -18,6 +19,12 @@ Sentry.init({
environment: NODE_ENV
});
// PostHogClient.init({
// projectApiKey: POSTHOG_PROJECT_API_KEY,
// host: POSTHOG_HOST,
// telemetryEnabled: TELEMETRY_ENABLED
// });
import {
signup as signupRouter,
auth as authRouter,