Skip to content

Instantly share code, notes, and snippets.

@mefellows
Created February 26, 2017 00:55
Show Gist options
  • Save mefellows/1d9d6e76412b9326b4f96dfe7ee7e3c8 to your computer and use it in GitHub Desktop.
Save mefellows/1d9d6e76412b9326b4f96dfe7ee7e3c8 to your computer and use it in GitHub Desktop.
Pact Node #27 Gist

Repro for Issue #27

npm i
node index.js

Should produce something like:

matt /tmp/vtest λ node index.js
/private/tmp/vtest/node_modules/@pact-foundation/pact-node/src/server.js:276
			throw new Error('Custom ssl certificate not found at path: ' + options.sslcert);
			^

Error: Custom ssl certificate not found at path: aoeu.pem
    at module.exports (/private/tmp/vtest/node_modules/@pact-foundation/pact-node/src/server.js:276:10)
    at Object.createServer (/private/tmp/vtest/node_modules/@pact-foundation/pact-node/src/pact.js:32:15)
    at Object.<anonymous> (/private/tmp/vtest/index.js:2:19)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Function.Module.runMain (module.js:575:10)
    at startup (node.js:160:18)
var pact = require('@pact-foundation/pact-node');
var server = pact.createServer({
log: "pact.log",
ssl: true,
sslcert: "aoeu.pem",
sslkey: "key.pem",
dir: "pacts",
spec: 2,
consumer: "consumer",
provider:"provider"
});
{
"name": "vtest",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@pact-foundation/pact-node": "^4.7.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment