server https
This commit is contained in:
parent
c2b0cf43d7
commit
f1592aa542
1 changed files with 7 additions and 7 deletions
|
@ -4,9 +4,13 @@ const url = require('url');
|
|||
const objectsModule = require('./objects');
|
||||
const fs = require('fs');
|
||||
|
||||
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 options = {
|
||||
cert: fs.readFileSync("/home/ubuntu/servers/keys/gta6/cert.pem"),
|
||||
key: fs.readFileSync("/home/ubuntu/servers/keys/gta6/privkey.pem")
|
||||
};
|
||||
|
||||
const server = https(options, (req, res)=>{
|
||||
res.end("Grand Tabernacle Auto 6")
|
||||
});
|
||||
const wss = new WebSocket.Server({
|
||||
server
|
||||
|
@ -18,10 +22,6 @@ var players = []
|
|||
|
||||
const NAME_MAXLEN = 25;
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.send('Grand Tabernacle Auto VI');
|
||||
});
|
||||
|
||||
function norm(x1, x2, y1, y2) {
|
||||
return Math.sqrt((x1 - x2) ** 2 + (y1 + y2) ** 2);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue