From 172b00b9eeb83e3258cb378a051ca8ebb7efa25f Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Wed, 27 Mar 2019 12:28:51 -0400 Subject: [PATCH] working directory comes from env file --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 6702861..95011ca 100644 --- a/index.js +++ b/index.js @@ -13,8 +13,8 @@ var readline = require('readline'); //------------------------------------------------------- var options = { - key: fs.readFileSync('//var/www/forecast_api/key.pem'), - cert: fs.readFileSync('//var/www/forecast_api/cert.pem'), + key: fs.readFileSync(wd + 'key.pem'), + cert: fs.readFileSync(wd + 'cert.pem'), passprase: [] }; @@ -47,9 +47,9 @@ Postgres.FirstRow = function (inSQL, args, inResponse) { server.get('/', (req, res) => res.send('node.js express is up and running')) -server.get('/login', (req, res) => res.sendFile('//var/www/forecast_api/msauth.html')) +server.get('/login', (req, res) => res.sendFile(wd + 'msauth.html')) -server.get('/logs', (req, res) => res.sendFile('//var/www/forecast_api/logs.html')) +server.get('/logs', (req, res) => res.sendFile(wd + 'logs.html')) server.get('/test_sql', function(req, res){