Skip to content

Commit

Permalink
Merge pull request #101 from SAP-samples/main-mock-server-update
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 05a59a3 + aad5d32 commit e16bb95
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 e16bb95

Please sign in to comment.