From ed1888d5b1a5ada1e675af81c338f5b22c0de3f9 Mon Sep 17 00:00:00 2001 From: Aminejv Date: Wed, 4 Aug 2021 18:41:41 +0100 Subject: [PATCH] feat(env): move external servers env to NEXT_PUBLIC format --- README.md | 7 +++---- common/environment.js | 5 +++++ node_common/environment.js | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d9c45a6d..28a731e0 100644 --- a/README.md +++ b/README.md @@ -69,10 +69,9 @@ TEXTILE_HUB_SECRET=XXX JWT_SECRET=XXX ALLOWED_HOST=localhost:1337 PUBSUB_SECRET=pKLO4lbzdMrhAFKwPo9bnmq03bxQrtu3 -RESOURCE_URI_UPLOAD=http://localhost:4242 -RESOURCE_URI_STORAGE_UPLOAD=http://localhost:4242 -RESOURCE_URI_PUBSUB=ws://localhost:6464 -RESOURCE_URI_SEARCH=http://localhost:1313 +NEXT_PUBLIC_URI_SHOVEL=http://localhost:4242 +NEXT_PUBLIC_URI_FIJI=ws://localhost:6464 +NEXT_PUBLIC_URI_LENS=http://localhost:1313 ``` ### Setup pubsub server diff --git a/common/environment.js b/common/environment.js index a0bef998..4f7ad88e 100644 --- a/common/environment.js +++ b/common/environment.js @@ -1,2 +1,7 @@ //NOTE(amine): feature flags export const ACTIVITY_FEATURE_FLAG = !!process.env.NEXT_PUBLIC_ACTIVITY_FEATURE_FLAG; + +// NOTE(jim): External servers +export const URI_SHOVEL = process.env.NEXT_PUBLIC_URI_SHOVEL; +export const URI_FIJI = process.env.NEXT_PUBLIC_URI_FIJI; +export const URI_LENS = process.env.NEXT_PUBLIC_URI_LENS; diff --git a/node_common/environment.js b/node_common/environment.js index 2abb20d1..0e3249b1 100644 --- a/node_common/environment.js +++ b/node_common/environment.js @@ -1,3 +1,4 @@ +/* eslint-disable prefer-destructuring */ export const NODE = process.env.NODE_ENV || "development"; export const IS_PRODUCTION = NODE === "production"; export const PORT = process.env.PORT || 1337; @@ -36,10 +37,9 @@ export const SUPPORT_SLACK_WEBHOOK_KEY = process.env.SUPPORT_SLACK_WEBHOOK_KEY; export const TEXTILE_SLACK_WEBHOOK_KEY = process.env.TEXTILE_SLACK_WEBHOOK_KEY; // NOTE(jim): External servers -export const RESOURCE_URI_UPLOAD = process.env.RESOURCE_URI_UPLOAD; -export const RESOURCE_URI_STORAGE_UPLOAD = process.env.RESOURCE_URI_STORAGE_UPLOAD; -export const RESOURCE_URI_PUBSUB = process.env.RESOURCE_URI_PUBSUB; -export const RESOURCE_URI_SEARCH = process.env.RESOURCE_URI_SEARCH; +export const URI_SHOVEL = process.env.NEXT_PUBLIC_URI_SHOVEL; +export const URI_FIJI = process.env.NEXT_PUBLIC_URI_FIJI; +export const URI_LENS = process.env.NEXT_PUBLIC_URI_LENS; //NOTE(amine): Twitter export const TWITTER_API_KEY = process.env.TWITTER_API_KEY;