mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
Compare commits
No commits in common. "4c1f2b4501c3446dbe196cf4e94cccba2ccbab4f" and "da3e810a32f198f4f1e65c4ff22f7a084dd0f342" have entirely different histories.
4c1f2b4501
...
da3e810a32
3 changed files with 5 additions and 7 deletions
|
|
@ -3,13 +3,12 @@ services:
|
|||
frontend:
|
||||
image: fuhrmanator/evaluetonsavoir-frontend:latest
|
||||
container_name: frontend
|
||||
environment:
|
||||
# Define empty VITE_BACKEND_URL because it's production
|
||||
- VITE_BACKEND_URL=
|
||||
# Define empty VITE_BACKEND_SOCKET_URL so it will default to window.location.host
|
||||
- VITE_BACKEND_SOCKET_URL=
|
||||
ports:
|
||||
- "5173:5173"
|
||||
environment:
|
||||
VITE_BACKEND_URL: "http://localhost:4400"
|
||||
# don't define VITE_BACKEND_SOCKET_URL so it will default to window.location.host
|
||||
# VITE_BACKEND_SOCKET_URL: ""
|
||||
restart: always
|
||||
|
||||
backend:
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ const cors = require("cors");
|
|||
const bodyParser = require('body-parser');
|
||||
|
||||
const configureServer = (httpServer, isDev) => {
|
||||
console.log(`Configuring server with isDev: ${isDev}`);
|
||||
return new Server(httpServer, {
|
||||
path: "/socket.io",
|
||||
cors: {
|
||||
|
|
@ -69,7 +68,7 @@ const server = http.createServer(app);
|
|||
|
||||
console.log(`Environnement: ${process.env.NODE_ENV} (${isDev ? 'dev' : 'prod'})`);
|
||||
|
||||
const io = configureServer(server, isDev);
|
||||
const io = configureServer(server);
|
||||
console.log(`Server configured with cors.origin: ${io.opts.cors.origin} and secure: ${io.opts.secure}`);
|
||||
|
||||
setupWebsocket(io);
|
||||
|
|
|
|||
Loading…
Reference in a new issue