server https
This commit is contained in:
parent
b12548d46b
commit
c2b0cf43d7
1 changed files with 6 additions and 4 deletions
|
@ -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
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue