From 84d06348e539213eb7084fe058e174cf5f8e6b70 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 1 Dec 2023 17:06:06 +0100 Subject: [PATCH] move config --- www/.gitignore | 2 ++ www/app/lib/edgeConfig.ts | 14 +------------- www/config-template.ts | 12 ++++++++++++ 3 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 www/config-template.ts diff --git a/www/.gitignore b/www/.gitignore index e52822e0..895fbb29 100644 --- a/www/.gitignore +++ b/www/.gitignore @@ -39,3 +39,5 @@ next-env.d.ts # Sentry Auth Token .sentryclirc + +config.ts \ No newline at end of file diff --git a/www/app/lib/edgeConfig.ts b/www/app/lib/edgeConfig.ts index a15f871e..bec5bb58 100644 --- a/www/app/lib/edgeConfig.ts +++ b/www/app/lib/edgeConfig.ts @@ -1,18 +1,6 @@ import { get } from "@vercel/edge-config"; import { isDevelopment } from "./utils"; - -const localConfig = { - features: { - requireLogin: false, - privacy: true, - browse: false, - sendToZulip: true, - }, - api_url: "http://127.0.0.1:1250", - websocket_url: "ws://127.0.0.1:1250", - auth_callback_url: "http://localhost:3000/auth-callback", - zulip_streams: "https://d3ow1y42gqfmk.cloudfront.net", -}; +import { localConfig } from "../../config"; type EdgeConfig = { [domainWithDash: string]: { diff --git a/www/config-template.ts b/www/config-template.ts new file mode 100644 index 00000000..6f0cf194 --- /dev/null +++ b/www/config-template.ts @@ -0,0 +1,12 @@ +export const localConfig = { + features: { + requireLogin: true, + privacy: true, + browse: true, + sendToZulip: true, + }, + api_url: "http://127.0.0.1:1250", + websocket_url: "ws://127.0.0.1:1250", + auth_callback_url: "http://localhost:3000/auth-callback", + zulip_streams: "", // Find the value on zulip +};