This commit is contained in:
parent
8f07ee9173
commit
3c46bea2ec
@ -8,7 +8,6 @@ RUN npm ci
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
ENV VITE_API_BASE_URL=/api
|
ENV VITE_API_BASE_URL=/api
|
||||||
ENV VITE_SOCKET_URL=/socket.io
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
|
|||||||
@ -12,8 +12,8 @@ class SocketService {
|
|||||||
if (this.socket && this.socket.connected) {
|
if (this.socket && this.socket.connected) {
|
||||||
return this.socket;
|
return this.socket;
|
||||||
}
|
}
|
||||||
const socketUrl =
|
const socketUrl = import.meta.env.DEV ? 'http://localhost:3000' : '';
|
||||||
import.meta.env.VITE_SOCKET_URL || 'http://localhost:3000';
|
|
||||||
this.socket = io(socketUrl, {
|
this.socket = io(socketUrl, {
|
||||||
auth: {
|
auth: {
|
||||||
token,
|
token,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user