diff --git a/front/src/config.template.js b/front/src/config.template.js index c7260a30ee9e6b96651057e5d34007e72686e768..63cf7dad020b61c949b6e3696c0fbcbc65ec5df5 100644 --- a/front/src/config.template.js +++ b/front/src/config.template.js @@ -1,4 +1,5 @@ module.exports = { - port: 5000, + protocol: 'http', host: 'localhost', + port: 5000, }; diff --git a/front/src/socket.js b/front/src/socket.js index f2fb6e24505915735f24ba8a1e8c3da21af86bda..ed2d38af2e4bc7196727780fa95227b8fb5c86f7 100644 --- a/front/src/socket.js +++ b/front/src/socket.js @@ -1,6 +1,6 @@ -import { port, host } from './config'; +import { protocol, host, port } from './config'; -const socketIO = io.connect(`http://${host || 'localhost'}:${port || 3000}/`); +const socketIO = io.connect(`${protocol}://${host || 'localhost'}:${port}/`); socketIO.on('connect', () => { socketIO.emit('date'); diff --git a/front/src/style.css b/front/src/style.css index 76e6a410d436d44a66fd015140e8dae6f7261aac..c8f8807f32fb528a9b6dfa0fb5314becbf0c6a3e 100644 --- a/front/src/style.css +++ b/front/src/style.css @@ -56,7 +56,6 @@ img.row-icon { margin-left: 10px; padding-top: 10px; padding-bottom: 10px; - border: 1px solid #ccc; } .image-text-bloc > .text-section > .text-element:last-child { diff --git a/server/config.template.js b/server/config.template.js index 8955193fbe722783eb4e259361cf5c3cb7631d8b..7fc2d89c16cba8ba63ab69cd40ea58717f0f7a71 100644 --- a/server/config.template.js +++ b/server/config.template.js @@ -3,6 +3,7 @@ const path = require('path'); module.exports = { port: 5000, + secure: false, uuid: 'UUID A REMPLIR', api: { url: 'http://api.hermod.cs-campus.fr', diff --git a/server/index.js b/server/index.js index 9361359b10407328dde9f07c8c4c55b56f09383c..0e0de98580533a1150aebe2f9cd0d0b4520bfc76 100644 --- a/server/index.js +++ b/server/index.js @@ -2,7 +2,7 @@ const http = require('http'); const fs = require('fs'); const path = require('path'); const socketIO = require('socket.io'); -const { port } = require('./config'); +const { port, secure } = require('./config'); const socket = require('./socket'); const indexPath = path.resolve(__dirname, '../front/build/index.html'); @@ -29,6 +29,6 @@ const server = (req, res) => { const app = http.createServer(server); app.listen(port || 3000); -const io = socketIO(app); +const io = socketIO(app, { secure }); io.of('/').on('connection', socket);