Skip to content

Commit 7974072

Browse files
authored
Merge pull request #3 from pact-foundation/chore/ipv6-for-mac-montery
chore: set host to ipv4 / 127.0.0.1
2 parents 919519a + a597cb0 commit 7974072

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

consumer/orderClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const request = require("superagent");
22
const { Order } = require("./order");
33

44
const fetchOrders = () => {
5-
return request.get(`http://localhost:${process.env.API_PORT}/orders`).then(
5+
return request.get(`http://127.0.0.1:${process.env.API_PORT}/orders`).then(
66
(res) => {
77
return res.body.reduce((acc, o) => {
88
acc.push(new Order(o.id, o.items));

pact.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const provider = new Pact({
1414
log: path.resolve(process.cwd(), "logs", "pact.log"),
1515
dir: path.resolve(process.cwd(), "pacts"),
1616
logLevel: "info",
17+
host: "127.0.0.1",
1718
consumer: consumerName,
1819
provider: providerName,
1920
});

provider/provider.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe("Pact Verification", () => {
1818
provider: providerName,
1919
// we need to where the provider will be running,
2020
// we are starting it locally and defined the port above
21-
providerBaseUrl: `http://localhost:${port}`,
21+
providerBaseUrl: `http://127.0.0.1:${port}`,
2222
// You can set the log level here, useful for debugging
2323
logLevel: "info"
2424
};

0 commit comments

Comments
 (0)