-
Notifications
You must be signed in to change notification settings - Fork 3
/
template.prod.env
47 lines (41 loc) · 2.51 KB
/
template.prod.env
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
# ------------------------------------------------------------------------------
# CAUTION:
# Ensure you're modifying the .env version of this file, not the
# template.*.env version. The .env version is the one that actually gets used
# by the code. The template.*.env version is the master copy that you copy to
# .env and then modify.
# ------------------------------------------------------------------------------
# Environment Config -- for secrets and config variables
# Reference these in the code with process.env.SECRET
BEEMINDER_CLIENT_ID='REPLACEMEwithActualIDGeneratedByBeeminder'
AUTH_REDIRECT_URI='https://REPLACEMEwithProjectName.glitch.me/connect'
SESSION_SECRET='REPLACEMEwithFreshlyGeneratedUUIDorOtherUniqueUnguessableString'
# Leave these unmodified unless you know what you're doing
DB_USER=''
DB_PASS=''
# NB: .env is a shell file so there can't be spaces around '='
# Only the non-secret version of this file -- template.prod.env -- is in version
# control. And on Glitch, for example, only invited collaborators can see the
# secret .env version.
# SETUP INSTRUCTIONS -----------------------------------------------------------
# 0. This only has to be done once or when moving where this is hosted
# 1. Copy this file (template.prod.env) to .env and follow the remaining steps there
# 2. Log into your personal Beeminder account
# 3. Go to beeminder.com/apps and click Register A New App
# 4. Put "Beebrain Graph Editor" or similar as the application name
# 5. Put https://graph.beeminder.com/connect as the Redirect URL
# (This used to be road.beeminder.com and could change again. We can also
# make any number of clones like graph-staging42.glitch.me and just add
# /connect to that to make the Redirect URL.)
# 6. Also fill that URL in here as the AUTH_REDIRECT_URI config variable
# 7. Leave the Callback URLs blank in the Beeminder form
# 8. Click the Register button to register the app
# 9. Beeminder generates and shows you the Client ID and Client Secret
# 10. Copy the Client ID to the BEEMINDER_CLIENT_ID config variable here
# 11. Make up a UUID (long random string) for the SESSION_SECRET config variable
# 12. Grep "REPLACEME" to ensure the only instance is the one in this sentence!
#
# To review, you've now copied this template.prod.env file to .env and filled in all
# the values for the config variables and ensured that the template.env version
# remains the master copy. This is confusing to the uninitiated!
# ------------------------------------------------------------------------------