From 545d4aec5f97a3365186f1fc733ea6a3ca115807 Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Wed, 5 Sep 2018 18:09:18 -0400 Subject: [PATCH] fix mongo connection URL for example fetch scripts --- server/scripts/examples-gg-latest.js | 2 +- server/scripts/examples.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/scripts/examples-gg-latest.js b/server/scripts/examples-gg-latest.js index 251c5315..f06a4000 100644 --- a/server/scripts/examples-gg-latest.js +++ b/server/scripts/examples-gg-latest.js @@ -67,7 +67,7 @@ canvas { const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' }; let mongoConnectionString; -if (process.env.NODE_ENV === 'production') { +if (process.env.NODE_ENV === 'production' && process.env.MONGO_RW_USERNAME && process.env.MONGO_RW_PASSWORD) { const { MONGO_RW_USERNAME, MONGO_RW_PASSWORD, diff --git a/server/scripts/examples.js b/server/scripts/examples.js index 2bdf37ce..cce7cd43 100644 --- a/server/scripts/examples.js +++ b/server/scripts/examples.js @@ -37,7 +37,7 @@ const clientSecret = process.env.GITHUB_SECRET; const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' }; let mongoConnectionString; -if (process.env.NODE_ENV === 'production') { +if (process.env.NODE_ENV === 'production' && process.env.MONGO_RW_USERNAME && process.env.MONGO_RW_PASSWORD) { const { MONGO_RW_USERNAME, MONGO_RW_PASSWORD,