-
Notifications
You must be signed in to change notification settings - Fork 18
/
.env-example
63 lines (38 loc) · 2.11 KB
/
.env-example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# .ENV EXAMPLE
This project uses Cloudinary, Mapbox, GitHub, and Google Places Autocomplete API.
To setup your environment, you'll need to create accounts for each of these providers.
Once you've done that, you can create your own `.env` file and add your secret keys as follows:
---
CLOUDINARY_API_KEY=112641**********
CLOUDINARY_API_SECRET=Qa1ZfO4syfbOC**********
CLOUDINARY_CLOUD_NAME=rtf******
CLOUDINARY_URL=cloudinary://298522699261255:Qa1ZfO4syfbOC-************************
MAPBOX_API_KEY=pk.eyJ1IjoicGR1b****************yZvNpTR_kk1kKqQ
GITHUB_CLIENT_ID=I****************a
GITHUB_CLIENT_SECRET=f*******************************9
GOOGLE_PLACES_SERVER_API_KEY=AIza***********************************
---
## Sign up instructions
### Cloudinary
Sign up at https://cloudinary.com/
### Mapbox
1. Visit [Mapbox](https://www.mapbox.com/signup/) and create an account
2. Go to your account page and look for _Access Tokens_. Either use your default token, or create a new token for the project.
### GitHub
1. Go to https://github.com/settings/developers
2. Click "New OAuth App"
3. Fill in the following fields:
**Application name:** _Any Name You Want_
**Homepage URL:** http://localhost:3000
**User authorization callback URL:** http://localhost:3000/users/auth/github/callback
### Google Places Autocomplete API
1. Go to https://cloud.google.com/console/google/maps-apis/overview
2. Sign up to Google Cloud Platform and accept the terms
3. Click "Select a project" and then "NEW PROJECT"
4. Name your project any way you like
5. Once the project is created (which may take some time), select your newly created project in the top navigation
6. Click "Places API" > "Enable"
7. Navigate to https://console.cloud.google.com/apis/credentials
8. Click "Create credentials" > "API key"
9. Add API key to your `.env` file as `GOOGLE_PLACES_SERVER_API_KEY`
10. IMPORTANT: You'll need to add a billing account, otherwise Google will restrict the API usage. Google provides a fair amount of free usage, but to ensure that you won't be billed you can set a max budget of 0$. More info here: https://cloud.google.com/billing/docs/how-to/budgets.