Skip to content
This repository was archived by the owner on Aug 8, 2019. It is now read-only.

Commit 4679861

Browse files
author
condef5
committed
Add .env.example
1 parent 8d780d7 commit 4679861

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ client/npm-debug.log*
4848
client/yarn-debug.log*
4949
client/yarn-error.log*
5050

51-
.env
51+
client/.env
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
REACT_APP_VERSION=$npm_package_version
22
REACT_APP_API_URL=http://localhost:4000/api
3+
REACT_APP_API_URL_PRODUCTION=

client/src/utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
export const apiUrl =
2-
process.env.REACT_APP_API_URL || "http://localhost:4000/api";
2+
process.env.NODE_ENV === "development"
3+
? process.env.REACT_APP_API_URL
4+
: process.env.REACT_APP_API_URL_PRODUCTION;

0 commit comments

Comments
 (0)