Skip to content

Commit

Permalink
fix: config socket.io path for production
Browse files Browse the repository at this point in the history
  • Loading branch information
boy52hz committed Mar 26, 2024
1 parent 7789a4e commit 9e9dd18
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
EXPO_PUBLIC_API_URL=
EXPO_PUBLIC_SOCKET_URL=
EXPO_PUBLIC_SOCKET_PATH=
EXPO_PUBLIC_AUTH0_DOMAIN=
EXPO_PUBLIC_AUTH0_CLIENT_ID=
EXPO_PUBLIC_AUTH0_AUDIENCE=
9 changes: 6 additions & 3 deletions eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"env": {
"APP_NAME": "WinWin Driver (Dev)",
"EXPO_PUBLIC_API_URL": "https://capstone23.sit.kmutt.ac.th/pl1/v1",
"EXPO_PUBLIC_SOCKET_URL": "https://capstone23.sit.kmutt.ac.th/pl1",
"EXPO_PUBLIC_SOCKET_URL": "https://capstone23.sit.kmutt.ac.th",
"EXPO_PUBLIC_SOCKET_PATH": "/pl1-socket",
"EXPO_PUBLIC_AUTH0_DOMAIN": "cp23pl1-kmutt.jp.auth0.com",
"EXPO_PUBLIC_AUTH0_CLIENT_ID": "Ga1wuCxlw5PlXkYU4DcC8V8WwBRYvE9E",
"EXPO_PUBLIC_AUTH0_AUDIENCE": "https://cp23pl1.sit.kmutt.ac.th/",
Expand All @@ -22,7 +23,8 @@
"env": {
"APP_NAME": "WinWin Driver (Preview)",
"EXPO_PUBLIC_API_URL": "https://capstone23.sit.kmutt.ac.th/pl1/v1",
"EXPO_PUBLIC_SOCKET_URL": "https://capstone23.sit.kmutt.ac.th/pl1",
"EXPO_PUBLIC_SOCKET_URL": "https://capstone23.sit.kmutt.ac.th",
"EXPO_PUBLIC_SOCKET_PATH": "/pl1-socket",
"EXPO_PUBLIC_AUTH0_DOMAIN": "cp23pl1-kmutt.jp.auth0.com",
"EXPO_PUBLIC_AUTH0_CLIENT_ID": "Ga1wuCxlw5PlXkYU4DcC8V8WwBRYvE9E",
"EXPO_PUBLIC_AUTH0_AUDIENCE": "https://cp23pl1.sit.kmutt.ac.th/",
Expand All @@ -33,7 +35,8 @@
"env": {
"APP_NAME": "WinWin Driver",
"EXPO_PUBLIC_API_URL": "https://capstone23.sit.kmutt.ac.th/pl1/v1",
"EXPO_PUBLIC_SOCKET_URL": "https://capstone23.sit.kmutt.ac.th/pl1",
"EXPO_PUBLIC_SOCKET_URL": "https://capstone23.sit.kmutt.ac.th",
"EXPO_PUBLIC_SOCKET_PATH": "/pl1-socket",
"EXPO_PUBLIC_AUTH0_DOMAIN": "cp23pl1-kmutt.jp.auth0.com",
"EXPO_PUBLIC_AUTH0_CLIENT_ID": "Ga1wuCxlw5PlXkYU4DcC8V8WwBRYvE9E",
"EXPO_PUBLIC_AUTH0_AUDIENCE": "https://cp23pl1.sit.kmutt.ac.th/",
Expand Down
1 change: 1 addition & 0 deletions src/libs/socket-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export const auth0AuthCallback = async (cb: (data: object) => void) => {

export const socketManager = new Manager(process.env.EXPO_PUBLIC_SOCKET_URL, {
autoConnect: false,
path: process.env.EXPO_PUBLIC_SOCKET_PATH,
})

0 comments on commit 9e9dd18

Please sign in to comment.