Skip to content

Commit

Permalink
Fix #66
Browse files Browse the repository at this point in the history
  • Loading branch information
BinaryBrain committed Aug 13, 2024
1 parent 62387bb commit 713c4eb
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Stage 1: Build the VueJS Client
FROM node:22 as client-build

ENV VITE_ORBITAL_SERVER_BASE_URL=http://10.0.0.4:3003

WORKDIR /
COPY package*.json ./
RUN npm install
Expand Down
1 change: 0 additions & 1 deletion client/.env.development
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
VITE_ORBITAL_SERVER_BASE_URL=http://localhost:3000
1 change: 0 additions & 1 deletion client/.env.production
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
VITE_ORBITAL_SERVER_BASE_URL=/
2 changes: 1 addition & 1 deletion client/src/axios-common.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Axios } from "axios";

export const axiosInstance = new Axios({
baseURL: import.meta.env.VITE_ORBITAL_SERVER_BASE_URL ?? "",
baseURL: window.location.href ?? "",
transformRequest: (data) => JSON.stringify(data),
headers: {
"Content-Type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion client/src/ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const WebSocketHandler = {
}

console.log("Starting connection to WebSocket Server");
const wsUrl = new URL(import.meta.env.VITE_ORBITAL_SERVER_BASE_URL);
const wsUrl = new URL(window.location.href);

// const wsProtocol = window.location.protocol === "https:" ? "wss://" : "ws://";
// export const ws = new WebSocket(wsProtocol + location.host + "/");
Expand Down

0 comments on commit 713c4eb

Please sign in to comment.