From fa5a9e39b24fff52a11913b9756b3a9241c7bd60 Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Tue, 26 Jun 2018 19:13:13 -0700 Subject: [PATCH] fix linting errors and do stuff to make build work --- .travis.yml | 18 +++++++++--------- docker-compose.yml | 8 ++++---- server/scripts/examples-gg-latest.js | 10 ++++++++-- server/scripts/examples.js | 10 ++++++++-- server/server.js | 10 ++++++++-- 5 files changed, 37 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1a6f47f4..e4768f10 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,12 +49,12 @@ env: global: - APP_IMAGE_NAME=p5jswebeditor_app -deploy: - provider: elasticbeanstalk - access_key_id: $AWS_ACCESS_KEY - secret_access_key: - secure: $AWS_SECRET_KEY - region: $AWS_REGION - app: $AWS_EBS_APP - env: $AWS_EBS_ENV - bucket_name: "the-target-S3-bucket" \ No newline at end of file +# deploy: +# provider: elasticbeanstalk +# access_key_id: $AWS_ACCESS_KEY +# secret_access_key: +# secure: $AWS_SECRET_KEY +# region: $AWS_REGION +# app: $AWS_EBS_APP +# env: $AWS_EBS_ENV +# bucket_name: "the-target-S3-bucket" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 1533a45a..4676f017 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,8 +10,8 @@ services: ports: - '27017:27017' # restart: always - env_file: - - .env + # env_file: + # - .env nginx: image: nginx:1.13 volumes: @@ -25,8 +25,8 @@ services: context: . dockerfile: Dockerfile target: production - env_file: - - .env + # env_file: + # - .env environment: - MONGO_URL=mongodb://mongo:27017/p5js-web-editor - MONGO_HOSTNAME=mongo diff --git a/server/scripts/examples-gg-latest.js b/server/scripts/examples-gg-latest.js index 52f66b1b..64885a66 100644 --- a/server/scripts/examples-gg-latest.js +++ b/server/scripts/examples-gg-latest.js @@ -68,11 +68,17 @@ const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' }; let mongoConnectionString; if (process.env.NODE_ENV === 'production') { - const { MONGO_RW_USERNAME, MONGO_RW_PASSWORD, MONGO_HOSTNAME, MONGO_PORT, MONGO_NAME } = process.env; + const { + MONGO_RW_USERNAME, + MONGO_RW_PASSWORD, + MONGO_HOSTNAME, + MONGO_PORT, + MONGO_NAME + } = process.env; const muo = new URL(`mongodb://${MONGO_HOSTNAME}:${MONGO_PORT}/${MONGO_NAME}`); muo.username = MONGO_RW_USERNAME; muo.password = MONGO_RW_PASSWORD; - mongoConnectionString = muo.href + "?authSource=admin"; + mongoConnectionString = `${muo.href}?authSource=admin`; } else { mongoConnectionString = process.env.MONGO_URL; } diff --git a/server/scripts/examples.js b/server/scripts/examples.js index 51841b2a..3bac39e7 100644 --- a/server/scripts/examples.js +++ b/server/scripts/examples.js @@ -38,11 +38,17 @@ const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' }; let mongoConnectionString; if (process.env.NODE_ENV === 'production') { - const { MONGO_RW_USERNAME, MONGO_RW_PASSWORD, MONGO_HOSTNAME, MONGO_PORT, MONGO_NAME } = process.env; + const { + MONGO_RW_USERNAME, + MONGO_RW_PASSWORD, + MONGO_HOSTNAME, + MONGO_PORT, + MONGO_NAME + } = process.env; const muo = new URL(`mongodb://${MONGO_HOSTNAME}:${MONGO_PORT}/${MONGO_NAME}`); muo.username = MONGO_RW_USERNAME; muo.password = MONGO_RW_PASSWORD; - mongoConnectionString = muo.href + "?authSource=admin"; + mongoConnectionString = `${muo.href}?authSource=admin`; } else { mongoConnectionString = process.env.MONGO_URL; } diff --git a/server/server.js b/server/server.js index 4e471e29..12e2ac3b 100644 --- a/server/server.js +++ b/server/server.js @@ -47,11 +47,17 @@ if (process.env.NODE_ENV === 'development') { let mongoConnectionString; if (process.env.NODE_ENV === 'production') { - const { MONGO_RW_USERNAME, MONGO_RW_PASSWORD, MONGO_HOSTNAME, MONGO_PORT, MONGO_NAME } = process.env; + const { + MONGO_RW_USERNAME, + MONGO_RW_PASSWORD, + MONGO_HOSTNAME, + MONGO_PORT, + MONGO_NAME + } = process.env; const muo = new URL(`mongodb://${MONGO_HOSTNAME}:${MONGO_PORT}/${MONGO_NAME}`); muo.username = MONGO_RW_USERNAME; muo.password = MONGO_RW_PASSWORD; - mongoConnectionString = muo.href + "?authSource=admin"; + mongoConnectionString = `${muo.href}?authSource=admin`; } else { mongoConnectionString = process.env.MONGO_URL; }