-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.env.local.example
74 lines (74 loc) · 2.7 KB
/
.env.local.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
64
65
66
67
68
69
70
71
72
73
74
#####
#
# ENVIRONMENT VARIABLES
# 1. Make a copy of this file and rename it ".env.local" (this shouldn't be committed to a public repo)
# 2. Update the values in the new file, per the instructions below
#
#####
#
# AUTH SECRET KEY => DO NOT SHARE WITH ANYONE (!)
# - a very secret string that only you know
# - used behind the scenes to sign and verify authenticated requests
# - ignored by git
# - updating the value effectively logs out all users
#
# 1. Update the VITE_AUTH_SECRET_KEY value (use the command below to generate a random key)
# ```
# node -e "console.log('VITE_AUTH_SECRET_KEY=\"'+crypto.randomBytes(16).toString('hex')+'\"')"
# ```
#
#####
VITE_AUTH_SECRET_KEY="this is a super secret example"
#####
#
# [ OPTIONAL ]
#
# CLOUDFLARE ANALYTICS TOKEN & HOST
# - Include this to enable server analytics logging
# - Only requests to pages will be logged (not files)
# - You can find your token on your Cloudflare Web Analytics dashboard:
# 1. Under your account visit "Analytics > Web Analytics"
# 2. Add your domain and select "Advanced options > disable automatic setup"
# 3. In the JS snippet, copy the 'token' value e.g:
# |
# | <!-- Cloudflare Web Analytics --><script defer
# | src='https://static.cloudflareinsights.com/beacon.min.js'
# | data-cf-beacon='{"token": "YOUR_TOKEN"}'>
# | </script><!-- End Cloudflare Web Analytics -->
#
# ---
# 4. Add your token below to enable server analytics:
#
#####
VITE_CF_ANALYTICS_TOKEN=""
#####
#
# 5. To only log analytics against a specific hostname, include it below
# - alternate / testing domains will not log analytics
# - preview builds (i.e. npm run dev) never log analytics regardless of
# hostname, but *will* print a notification in lieue of an actual log
# - setting a host is recommended for production sites
#
#####
VITE_CF_ANALYTICS_HOST=""
#####
#
#
# BUILT-IN CLOUDFLARE ANALYTICS DASHBOARD
# 6. To access analytics data from the {domain}/analytics endpoint include a
# valid API token and your account ID below.
# - Account ID can be found in your account dashboard, see instructions here:
# https://developers.cloudflare.com/fundamentals/get-started/basic-tasks/find-account-and-zone-ids/
# - To generate an appropriate (read-only) GraphQL API token:
# 1. visit https://dash.cloudflare.com/profile/api-tokens
# 2. select 'Create Token' then scroll down and select "Custom token"
# 3. give your token an appropriate name e.g. "Read account analytics"
# 4. under Permissions choose "Account" > "Account Analytics" > "Read"
# 5. under Account Resources choose "Include" > { your account }
# 6. select "Continue to summary" followed by "Create token"
# 7. Copy the token and paste it below
#
#####
VITE_CF_GRAPHQL_TOKEN=""
VITE_CF_ACCOUNT_ID=""
#####