From c2b0cf43d70345bf546ec64f42b466bd42303e09 Mon Sep 17 00:00:00 2001 From: Killian Marty Date: Fri, 8 Dec 2023 13:53:44 +0100 Subject: [PATCH] server https --- server/server.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server/server.js b/server/server.js index 5db58e2..1508e82 100644 --- a/server/server.js +++ b/server/server.js @@ -1,11 +1,13 @@ -const express = require('express'); -const http = require('http'); +const https = require('https').createServer; const WebSocket = require('ws'); const url = require('url'); const objectsModule = require('./objects'); +const fs = require('fs'); -const app = express(); -const server = http.createServer(app); +const server = https({ + cert: fs.readFileSync("/etc/letsencrypt/live/ws.gta6.insat.fr/cert.pem"), + key: fs.readFileSync("/etc/letsencrypt/live/ws.gta6.insat.fr/privkey.pem") +}); const wss = new WebSocket.Server({ server });