Skip to content

Commit

Permalink
Merge pull request #63 from hrspace-request-builder/wip/changeDataTyp…
Browse files Browse the repository at this point in the history
…esToServer

add env
  • Loading branch information
LedyBacer authored Mar 25, 2024
2 parents 9f58139 + 61e4b5d commit 2aa3706
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env_example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_BASE_URL=http://1.1.1.1/api/v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
.env.development.local
.env.test.local
.env.production.local
.env

npm-debug.log*
yarn-debug.log*
Expand Down
1 change: 1 addition & 0 deletions .idea/hrspace-requst-builder.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/api/api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const BASE_URL = "http://185.221.162.231/api/v1";
export const BASE_URL = process.env.REACT_APP_BASE_URL;

const checkResponse = (res) =>
res.ok ? res.json() : Promise.reject(new Error(`Ошибка ${res.status}`));
Expand Down

0 comments on commit 2aa3706

Please sign in to comment.