Files
Chamilo/web/assets/simpleWebRTC/server.js
2025-04-10 11:37:29 +02:00

20 lines
561 B
JavaScript

// silly chrome wants SSL to do screensharing
var fs = require('fs'),
express = require('express'),
https = require('https'),
http = require('http');
var privateKey = fs.readFileSync('fakekeys/privatekey.pem').toString(),
certificate = fs.readFileSync('fakekeys/certificate.pem').toString();
var app = express();
app.use(express.static(__dirname));
https.createServer({key: privateKey, cert: certificate}, app).listen(8000);
http.createServer(app).listen(8001);
console.log('running on https://localhost:8000 and http://localhost:8001');