From fd34753b651e3551f622e31e4308172c818f5ecb Mon Sep 17 00:00:00 2001 From: Charles Feval Date: Wed, 21 Aug 2019 16:49:36 -0700 Subject: [PATCH] Parameterizing protocol so we can use https instead of http --- routes/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routes/index.js b/routes/index.js index dd3c64e..8a70979 100644 --- a/routes/index.js +++ b/routes/index.js @@ -2,8 +2,9 @@ var express = require('express'); var router = express.Router(); /* GET home page. */ -router.get('/', function(req, res, next) { - res.render('index', { title: 'Orders', captureOrderService: "http://"+process.env.CAPTUREORDERSERVICEIP+"/v1/order" }); +router.get('/', function (req, res, next) { + const serviceUrl = process.env.CAPTUREORDERSERVICEURL || "http://" + process.env.CAPTUREORDERSERVICEIP; + res.render('index', { title: 'Orders', captureOrderService: serviceUrl + "/v1/order" }); }); module.exports = router;