From c814826c4a16120b9a352159a239c5002ba17913 Mon Sep 17 00:00:00 2001 From: Jared Donovan Date: Tue, 19 Jun 2018 07:30:05 +1000 Subject: [PATCH] Remove EXAMPLE_USERNAME as a settable option as per discussion on Issue #646 (#651) --- .env.example | 1 - README.md | 10 ++++------ server/examples.js | 8 ++++---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.env.example b/.env.example index 794704dc..ee948df6 100644 --- a/.env.example +++ b/.env.example @@ -11,6 +11,5 @@ GITHUB_SECRET= GOOGLE_ID= (use google+ api) GOOGLE_SECRET= (use google+ api) MAILGUN_KEY= -EXAMPLE_USERNAME= EXAMPLE_USER_EMAIL= EXAMPLE_USER_PASSWORD= \ No newline at end of file diff --git a/README.md b/README.md index 2b97b9ca..44e8ebdf 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,8 @@ This project is currently in development! It will be announced when there is a ( GOOGLE_ID= (use google+ api) GOOGLE_SECRET= (use google+ api) MAILGUN_KEY= - EXAMPLE_USERNAME= - EXAMPLE_USER_EMAIL= - EXAMPLE_USER_PASSWORD= + EXAMPLE_USER_EMAIL= + EXAMPLE_USER_PASSWORD= ``` If you don't care about being able to upload media files to S3 or Login with Github or Google, you can drop in the file exactly how it is. Or, if you don't want to do that, just ask me to send you mine. Refer to [this gist](https://gist.github.com/catarak/70c9301f0fd1ac2d6b58de03f61997e3) for creating an S3 bucket for testing, or if you don't want to do that, I can add you to one of my S3 buckets. @@ -93,9 +92,8 @@ If you don't have the full server environment running, you can launch a one-off MAILGUN_KEY= MAILGUN_DOMAIN= EMAIL_VERIFY_SECRET_TOKEN=whatever_you_want_this_to_be_it_only_matters_for_production - EXAMPLE_USERNAME= - EXAMPLE_USER_EMAIL= - EXAMPLE_USER_PASSWORD= + EXAMPLE_USER_EMAIL= + EXAMPLE_USER_PASSWORD= ``` For production, you will need to have real Github and Amazon credentials. Refer to [this gist](https://gist.github.com/catarak/70c9301f0fd1ac2d6b58de03f61997e3) for creating an S3 bucket for testing. diff --git a/server/examples.js b/server/examples.js index 305b623e..bdf54c1d 100644 --- a/server/examples.js +++ b/server/examples.js @@ -137,7 +137,7 @@ function createProjectsInP5user(projectsInAllCategories) { }; rp(options).then((res) => { - User.findOne({ username: process.env.EXAMPLE_USERNAME }, (err, user) => { + User.findOne({ username: 'p5' }, (err, user) => { if (err) throw err; eachSeries(projectsInAllCategories, (projectsInOneCategory, categoryCallback) => { @@ -289,19 +289,19 @@ function createProjectsInP5user(projectsInAllCategories) { } function getp5User() { - User.findOne({ username: process.env.EXAMPLE_USERNAME }, (err, user) => { + User.findOne({ username: 'p5' }, (err, user) => { if (err) throw err; let p5User = user; if (!p5User) { p5User = new User({ - username: process.env.EXAMPLE_USERNAME, + username: 'p5', email: process.env.EXAMPLE_USER_EMAIL, password: process.env.EXAMPLE_USER_PASSWORD }); p5User.save((saveErr) => { if (saveErr) throw saveErr; - console.log(`Created a user p5${p5User}`); + console.log(`Created a user p5 ${p5User}`); }); }