From 87618a740dc26ef7326223b7f2893d54b0c7a5c0 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Tue, 11 Jan 2022 02:39:04 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Removed=20useless=20https=20serv?= =?UTF-8?q?er?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Should use ssl termination instead --- backend/index.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/backend/index.js b/backend/index.js index 50fb29a..cf40f39 100644 --- a/backend/index.js +++ b/backend/index.js @@ -1,5 +1,3 @@ -const https = require('https') -const fs = require('fs') const express = require('express') const session = require('express-session') const app = express() @@ -202,12 +200,4 @@ app.get('/options', async (req, res) => { } }) -if (process.env.NODE_ENV === 'production') { - https.createServer({ - key: fs.readFileSync(process.env.SSL+'/privkey.pem'), - cert: fs.readFileSync(process.env.SSL+'/cert.pem') - }, app) - .listen(process.env.PORT, () => console.log('Prod server started on ' + process.env.PORT)); -} else { - app.listen(process.env.PORT, () => console.log('Dev server started on ' + process.env.PORT)); -} \ No newline at end of file +app.listen(process.env.PORT, () => console.log('Server started on ' + process.env.PORT)); \ No newline at end of file