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,