fix mongo connection URL for example fetch scripts

This commit is contained in:
Cassie Tarakajian 2018-09-05 18:09:18 -04:00
parent 02c7c2f26d
commit 545d4aec5f
2 changed files with 2 additions and 2 deletions

View file

@ -67,7 +67,7 @@ canvas {
const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' }; const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' };
let mongoConnectionString; 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 { const {
MONGO_RW_USERNAME, MONGO_RW_USERNAME,
MONGO_RW_PASSWORD, MONGO_RW_PASSWORD,

View file

@ -37,7 +37,7 @@ const clientSecret = process.env.GITHUB_SECRET;
const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' }; const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' };
let mongoConnectionString; 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 { const {
MONGO_RW_USERNAME, MONGO_RW_USERNAME,
MONGO_RW_PASSWORD, MONGO_RW_PASSWORD,