💚 some adjustment
continuous-integration/drone/push Build is passing Details

deployement
Vincent ASTOLFI 11 months ago
parent b0f5a9b129
commit 6364150519

@ -3,12 +3,14 @@ const app = express();
const http = require("http").Server(app);
const { createServer } = require("http");
const { Server } = require("socket.io");
const port = 8081;
const port = 8080;
const url = "https://codefirst.iut.uca.fr/containers/vincentastolfi-maettleship"
const httpServer = createServer();
const io = new Server(httpServer, {
cors: {
origin: "https://codefirst.iut.uca.fr/containers/vincentastolfi-maettleship",
origin: url,
// or with an array of origins
// origin: ["https://my-frontend.com", "https://my-other-frontend.com", "http://localhost:3000"],
credentials: true
@ -18,7 +20,7 @@ const io = new Server(httpServer, {
app.use(express.static("public"));
http.listen(port, () => {
console.log(`Listening on http://localhost:${port}`);
console.log(`Listening on ${url}:${port}`);
});
module.exports = {

@ -1,6 +1,6 @@
import { drawGrid, drawEnnemyGrid, play, selectPiece } from "./game.js";
export const socket = io("https://codefirst.iut.uca.fr/containers/vincentastolfi-maettleship:8081", {
export const socket = io("https://codefirst.iut.uca.fr/containers/vincentastolfi-maettleship", {
withCredentials: true,
});
export let roomId = "";

Loading…
Cancel
Save