-
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.
Added .env file and improve readme file (#1)
* Added .env file and improve readme file * Added .env file for set environment * Fix minor bug in the production state * Added default value --------- Co-authored-by: Mohammad Yosefpor <[email protected]>
- Loading branch information
1 parent
2c9fbf8
commit a0d9551
Showing
7 changed files
with
157 additions
and
318 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 @@ | ||
# TEH1_BACKEND_URL,TEH2_BACKEND_URL,SNAPPGROUP_BACKEND_URL = "https://status-be." | ||
TEH1_BACKEND_URL=https://status-be.apps.private.okd4.teh-1.snappcloud.io | ||
TEH2_BACKEND_URL=https://status-be.apps.private.okd4.teh-2.snappcloud.io | ||
SNAPPGROUP_BACKEND_URL=https://status-be.apps.private.snappgroup.teh-1.snappcloud.io |
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
# next.js | ||
/.next/ | ||
/out/ | ||
.env | ||
|
||
# production | ||
/build | ||
|
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,18 +1,14 @@ | ||
/** @type {import('next').NextConfig} */ | ||
|
||
const is_production = process.env.NODE_ENV === 'production'; | ||
require('dotenv').config(); | ||
|
||
const isProduction = process.env.NODE_ENV === 'production'; | ||
|
||
module.exports = { | ||
env: { | ||
TEH1_BACKEND_URL: is_production ? | ||
"https://status-be.apps.private.okd4.teh-1.snappcloud.io" : | ||
"http://127.0.0.1:8080", | ||
TEH2_BACKEND_URL: is_production ? | ||
"https://status-be.apps.private.okd4.teh-2.snappcloud.io" : | ||
"http://127.0.0.1:8080", | ||
SNAPPGROUP_BACKEND_URL: is_production ? | ||
"https://status-be.apps.private.snappgroup.teh-1.snappcloud.io" : | ||
"http://127.0.0.1:8080", | ||
}, | ||
output: 'standalone', | ||
env: { | ||
TEH1_BACKEND_URL: isProduction ? process.env.TEH1_BACKEND_URL : '' , | ||
TEH2_BACKEND_URL: isProduction ? process.env.TEH2_BACKEND_URL : '', | ||
SNAPPGROUP_BACKEND_URL: isProduction ? process.env.SNAPPGROUP_BACKEND_URL : '', | ||
}, | ||
output: 'standalone', | ||
}; |
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
Oops, something went wrong.