Skip to content

Remove EXAMPLE_USERNAME as a settable option as per discussion on Iss… #651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ GITHUB_SECRET=<your-github-client-secret>
GOOGLE_ID=<your-google-client-id> (use google+ api)
GOOGLE_SECRET=<your-google-client-secret> (use google+ api)
MAILGUN_KEY=<your-mailgun-api-key>
EXAMPLE_USERNAME=<your-name>
EXAMPLE_USER_EMAIL=<your-email-id>
EXAMPLE_USER_PASSWORD=<your-password>
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ This project is currently in development! It will be announced when there is a (
GOOGLE_ID=<your-google-client-id> (use google+ api)
GOOGLE_SECRET=<your-google-client-secret> (use google+ api)
MAILGUN_KEY=<your-mailgun-api-key>
EXAMPLE_USERNAME=<your-name>
EXAMPLE_USER_EMAIL=<your-email-id>
EXAMPLE_USER_PASSWORD=<your-password>
EXAMPLE_USER_EMAIL=<email-id-for-p5-example-user>
EXAMPLE_USER_PASSWORD=<password-for-p5-example-user>
```

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.
Expand Down Expand Up @@ -93,9 +92,8 @@ If you don't have the full server environment running, you can launch a one-off
MAILGUN_KEY=<mailgun-api-key>
MAILGUN_DOMAIN=<mailgun-domain>
EMAIL_VERIFY_SECRET_TOKEN=whatever_you_want_this_to_be_it_only_matters_for_production
EXAMPLE_USERNAME=<your-name>
EXAMPLE_USER_EMAIL=<your-email-id>
EXAMPLE_USER_PASSWORD=<your-password>
EXAMPLE_USER_EMAIL=<email-id-for-p5-example-user>
EXAMPLE_USER_PASSWORD=<password-for-p5-example-user>
```
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.

Expand Down
8 changes: 4 additions & 4 deletions server/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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}`);
});
}

Expand Down