Skip to content

Commit

Permalink
feat: 增加线上环境
Browse files Browse the repository at this point in the history
  • Loading branch information
zongyanglaobiao committed Jun 21, 2024
1 parent 4cf04b4 commit 02ef591
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions front-end/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
* @type {string}
*/
VITE_REACT_APP_PATH = http://localhost:8080/

VITE_REACT_APP_WEBSOCKET_PATH = ws://127.0.0.1:8080//chat/websocket/
4 changes: 3 additions & 1 deletion front-end/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
* 请求源路径
* @type {string}
*/
VITE_REACT_APP_PATH =
VITE_REACT_APP_PATH = http://xxl.cab:8080/

VITE_REACT_APP_WEBSOCKET_PATH = ws://xxl.cab:8080//chat/websocket/
2 changes: 1 addition & 1 deletion front-end/src/http/websocket/websocket.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

const WEBSOCKET_URL = "ws://127.0.0.1:8080//chat/websocket/";
const WEBSOCKET_URL = import.meta.env.VITE_REACT_APP_WEBSOCKET_PATH;

let socket = null

Expand Down

0 comments on commit 02ef591

Please sign in to comment.