added env variables to store hsot and ports

This commit is contained in:
Quentin Roussel
2024-03-27 21:49:10 +01:00
parent 6debf95b8f
commit f70aa52dd0
5 changed files with 25 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ import { createContext, useContext, useMemo } from "react";
const { io } = require("socket.io-client");
const SOCKET_URL = "http://localhost:3000";
const SOCKET_URL = 'http://' + process.env.NEXT_PUBLIC_SOCKET_HOST + ':' + process.env.NEXT_PUBLIC_SOCKET_PORT;
const USER_SOCKET_URL = SOCKET_URL + "/player";
const ADMIN_SOCKET_URL = SOCKET_URL + "/admin";