Skip to content

Commit

Permalink
Merge pull request #100 from SAP-samples/updating-mock-server
Browse files Browse the repository at this point in the history
resolving issue with IPV6
  • Loading branch information
AlexRieder committed Jul 5, 2023
2 parents 5ea5211 + 8847d56 commit 18aa4f7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions code/easyfranchise/source/business-partner-mock-server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ app.get('/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner', function (r
});
})

var server = app.listen(8081, 'localhost', function () {
var host = server.address().address
var server = app.listen(8081, '127.0.0.1', function () {
var host = server.address().address;
if (host === '::') {
host = 'localhost';
}
console.log("Host: " + host);
var port = server.address().port
console.log("Port: " + port);

console.log("Business Partner Mock listening at http://%s:%s", host, port)
})
})

0 comments on commit 18aa4f7

Please sign in to comment.