Update the Contributing guidelines with sample.env
This commit updates the contributing guidelines with a sample.env Contributors can simply make a sopy of the same instead of creating one for the private environment variables.
This commit is contained in:
@ -51,47 +51,21 @@ npm install -g bower
|
||||
|
||||
# Install Bower dependencies
|
||||
bower install
|
||||
|
||||
# Create a .env file and populate it with the necessary API keys and secrets:
|
||||
touch .env
|
||||
```
|
||||
*Private Environment Variables (API Keys)*
|
||||
```bash
|
||||
# Create a copy of the "sample.env" and name it as ".env".
|
||||
# Populate it with the necessary API keys and secrets:
|
||||
cp sample.env .env
|
||||
```
|
||||
|
||||
Edit your `.env` file with the following API keys accordingly. If you only use email login, only the `MONGOHQ_URL`, `SESSION_SECRET`, `MANDRILL_USER` and `MANDRILL_PASSWORD` fields are necessary. Keep in mind if you want to use more services you'll have to get your own API keys for those services. If you only use a subset or no OAuth2 authentication methods, you may want to remove them from ```server/passport-providers.js``` - otherwise the server will complain about missing clientIDs at launch.
|
||||
Edit your `.env` file and modify the API keys only for services that you will use.
|
||||
|
||||
```
|
||||
MONGOHQ_URL='mongodb://localhost:27017/freecodecamp'
|
||||
Note : Not all keys are required, to run the app locally, however `MONGOHQ_URL` is the most important one.
|
||||
|
||||
FACEBOOK_ID=stuff
|
||||
FACEBOOK_SECRET=stuff
|
||||
If you only use email login, in addition to `MONGOHQ_URL`, `SESSION_SECRET`, add the `MANDRILL_USER` and `MANDRILL_PASSWORD` API Keys. Not setting these keys will throw an exception when you sign up which you can ignore, you will still be able to login, however you may get these keys [here](https://www.mandrill.com/signup/). Sign up and create a new pair of keys.
|
||||
|
||||
GITHUB_ID=stuff
|
||||
GITHUB_SECRET=stuff
|
||||
|
||||
GOOGLE_ID=stuff
|
||||
GOOGLE_SECRET=stuff
|
||||
|
||||
LINKEDIN_ID=stuff
|
||||
LINKEDIN_SECRET=stuff
|
||||
|
||||
MANDRILL_PASSWORD=stuff
|
||||
MANDRILL_USER=stuff
|
||||
|
||||
TRELLO_KEY=stuff
|
||||
TRELLO_SECRET=stuff
|
||||
|
||||
TWITTER_KEY=stuff
|
||||
TWITTER_SECRET=stuff
|
||||
TWITTER_TOKEN=stuff
|
||||
TWITTER_TOKEN_SECRET=stuff
|
||||
|
||||
BLOGGER_KEY=stuff
|
||||
|
||||
SESSION_SECRET=secretstuff
|
||||
COOKIE_SECRET='this is a secret'
|
||||
|
||||
PEER=stuff
|
||||
DEBUG=true
|
||||
```
|
||||
You can leave the other keys as they are. Keep in mind if you want to use more services you'll have to get your own API keys for those services and edit those entries accordingly in the `.env` file.
|
||||
|
||||
```bash
|
||||
# Start the mongo server in a separate terminal
|
||||
|
32
sample.env
Normal file
32
sample.env
Normal file
@ -0,0 +1,32 @@
|
||||
MONGOHQ_URL='mongodb://localhost:27017/freecodecamp'
|
||||
|
||||
FACEBOOK_ID=stuff
|
||||
FACEBOOK_SECRET=stuff
|
||||
|
||||
GITHUB_ID=stuff
|
||||
GITHUB_SECRET=stuff
|
||||
|
||||
GOOGLE_ID=stuff
|
||||
GOOGLE_SECRET=stuff
|
||||
|
||||
LINKEDIN_ID=stuff
|
||||
LINKEDIN_SECRET=stuff
|
||||
|
||||
MANDRILL_PASSWORD=stuff
|
||||
MANDRILL_USER=stuff
|
||||
|
||||
TRELLO_KEY=stuff
|
||||
TRELLO_SECRET=stuff
|
||||
|
||||
TWITTER_KEY=stuff
|
||||
TWITTER_SECRET=stuff
|
||||
TWITTER_TOKEN=stuff
|
||||
TWITTER_TOKEN_SECRET=stuff
|
||||
|
||||
BLOGGER_KEY=stuff
|
||||
|
||||
SESSION_SECRET=secretstuff
|
||||
COOKIE_SECRET='this is a secret'
|
||||
|
||||
PEER=stuff
|
||||
DEBUG=true
|
Reference in New Issue
Block a user