This commit is contained in:
pb-coding 2023-09-23 19:21:01 +02:00
parent cdf179c5c1
commit f451870db6
3 changed files with 13 additions and 8 deletions

5
.env Normal file
View file

@ -0,0 +1,5 @@
VITE_ENVIRONMENT=dev
VITE_BACKEND_URL=https://skyjo-backend.voltvector.org
#VITE_ENVIRONMENT=local
#VITE_BACKEND_URL=http://localhost:3001

View file

@ -1,10 +1,10 @@
import React from 'react' import React from "react";
import ReactDOM from 'react-dom/client' import ReactDOM from "react-dom/client";
import App from './App.tsx' import App from "./App.tsx";
import './index.css' import "./index.css";
ReactDOM.createRoot(document.getElementById('root')!).render( ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode> <React.StrictMode>
<App /> <App />
</React.StrictMode>, </React.StrictMode>
) );

View file

@ -1,5 +1,5 @@
import { io } from "socket.io-client"; import { io } from "socket.io-client";
const URL = "https://skyjo-backend.voltvector.org"; const URL = import.meta.env.VITE_BACKEND_URL || "";
export const socket = io(URL); export const socket = io(URL);