Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Parameterizing protocol so we can use https instead of http #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;