Skip to content

Commit

Permalink
feat(): [env] added env
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurArakelyan committed Oct 19, 2023
1 parent ecf5707 commit 8655baf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions chat/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_SOCKET_URL=http://localhost:5000
2 changes: 2 additions & 0 deletions chat/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
.env.development.local
.env.test.local
.env.production.local
.env.production
.env.development

npm-debug.log*
yarn-debug.log*
Expand Down
2 changes: 1 addition & 1 deletion chat/src/utilities/socket/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { io } from 'socket.io-client';

const socket = io('http://localhost:5000');
const socket = io(process.env.REACT_APP_SOCKET_URL as string);

export default socket;

0 comments on commit 8655baf

Please sign in to comment.