Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.listen(async () => {
const baseUrl = `http://127.0.0.1:${server.address().port}`;
const gofer = new Gofer({ globalDefaults: { baseUrl } });
try {
await gofer.fetch('/foo');
} catch (err) {
console.log(err);
}
console.log('\n===\n');
await fetchAndPrint(gofer, '/bar');
server.close();
});
function Github(config) {
Gofer.call(this, config, 'github');
}
util.inherits(Github, Gofer);