-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Make env variables config more robust
I really like having config variables in a JavaScript or a TypeScript file, but Vercel is setup to expect .env files.
- Loading branch information
1 parent
f99fda1
commit 46b0040
Showing
10 changed files
with
96 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Restrict access to the API to certain origins only. Replace kgbd.. | ||
# with the ID of your extension. Or, you can allow access to the API from all | ||
# origins by setting ACCESS_CONTROL_ALLOW_ORIGIN=* | ||
ACCESS_CONTROL_ALLOW_ORIGIN=chrome-extension://kgbbebdcmdgkbopcffmpgkgcmcoomhmh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# The URL at which the /api/auth endpoint from the backend is hosted | ||
AUTH_URL=https://calendar-plus.patii.uk/api/auth | ||
|
||
# Replace kgbb... with the ID of the extension | ||
GOOGLE_CLIENT_REDIRECT_URL=https://kgbbebdcmdgkbopcffmpgkgcmcoomhmh.chromiumapp.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Fill this in with the values received after creating a Google OAuth2 | ||
# credentials | ||
GOOGLE_CLIENT_ID=aaaaaaaaaaaa-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.apps.googleusercontent.com | ||
GOOGLE_CLIENT_SECRET=AAAAAA-BBBBBBBBBBBBBBBBBBBBBBBBBBBB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# The URL at which the /api/auth endpoint from the backend is hosted | ||
AUTH_URL=http://localhost:3000/api/auth | ||
|
||
# Replace kgbb... with the ID of the extension | ||
GOOGLE_CLIENT_REDIRECT_URL=https://kgbbebdcmdgkbopcffmpgkgcmcoomhmh.chromiumapp.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/config.js | ||
/.env*.local | ||
.next | ||
.swc | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters