-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor authentication URLs to use APP_URL constant and add example.…
…env file for environment variables
- Loading branch information
1 parent
0de169c
commit 5cb3d35
Showing
7 changed files
with
23 additions
and
15 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
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,5 +1,8 @@ | ||
import os | ||
|
||
API_URL = "https://api.cas.upayan.dev" | ||
APP_URL = "https://cas.upayan.dev" | ||
|
||
if os.getenv("ENV") == "development": | ||
API_URL = "http://localhost:4000" | ||
API_URL = "http://localhost:4000" | ||
APP_URL = "http://localhost:3000" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
NEXT_PUBLIC_FIREBASE_API_KEY= | ||
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN= | ||
NEXT_PUBLIC_FIREBASE_PROJECT_ID= | ||
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET= | ||
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID= | ||
NEXT_PUBLIC_FIREBASE_APP_ID= | ||
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID= | ||
|
||
NEXT_PUBLIC_ENV= #leave blank for production. for development, use development |
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,3 @@ | ||
const ENV = process.env.NEXT_PUBLIC_ENV; | ||
|
||
export const NEXT_PUBLIC_API_URL = ENV === 'development' ? 'http://localhost:4000' : 'https://api.cas.upayan.dev'; |
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