From e727a496afbc6f395c8b15f18aa26d55d1291f75 Mon Sep 17 00:00:00 2001 From: Walamana Date: Tue, 28 Nov 2017 20:32:13 +0100 Subject: [PATCH] ... Signed-off-by: Walamana --- app.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app.js b/app.js index 99f1275..20fb6bc 100644 --- a/app.js +++ b/app.js @@ -35,7 +35,7 @@ con.connect(err => { app.get('/', (req, res) => { - //if(!isConnected()){res.send("No Connection to database
" + JSON.stringify(cause));return} + if(!isConnected()){res.send("No Connection to database
" + JSON.stringify(cause));return} res.send("Welcome to the miniplan api!"); }); @@ -146,14 +146,7 @@ var attachToMini = function(mini){ } -https.createServer( - { - key: fs.readFileSync(process.cwd() + "/private.key"), - cert: fs.readFileSync(process.cwd() + "/primary.crt"), - ca: fs.readFileSync(process.cwd() + "/mysql-ca.crt") - }, - app -).listen(process.env.PORT); +app.listen(porcess.env.PORT);