From da182cb935a810e5f0f12b0b8dd4092d0b5cacfb Mon Sep 17 00:00:00 2001 From: jrtechs Date: Fri, 22 Jun 2018 23:37:32 +0000 Subject: [PATCH] Updated server to work with lets encrypt --- run | 0 server.js | 11 +++++------ 2 files changed, 5 insertions(+), 6 deletions(-) mode change 100644 => 100755 run diff --git a/run b/run old mode 100644 new mode 100755 diff --git a/server.js b/server.js index a10d6b4..0264f14 100644 --- a/server.js +++ b/server.js @@ -7,6 +7,8 @@ const http = require('http'); +const https = require('https'); + const url = require('url'); var express = require("express"); @@ -28,9 +30,9 @@ app.use(session({ secret: utils.getFileLine('../session_secret'), cookie: { maxA var privateKey = fs.readFileSync('/etc/letsencrypt/live/jrtechs.net/privkey.pem'); -var certificate = fs.readFileSync('/etc/letsencrypt/live/jrtechs.net/certificate.pem'); +var certificate = fs.readFileSync('/etc/letsencrypt/live/jrtechs.net/cert.pem'); -var port = 8080; +var port = 8000; /** @@ -85,7 +87,4 @@ app.use(function(request, res) } }); -https.createServer({ - key: privateKey, - cert: certificate -}, app).listen(port); +http.createServer(app).listen(port);