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;