-
-
Save spinningarrow/8ddd202e7e27568c754e71bb53a72b65 to your computer and use it in GitHub Desktop.
Concourse cc.xml "proxy"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require('http') | |
const port = 2016 | |
const { exec } = require('child_process') | |
const requestHandler = (request, response) => { | |
console.log(request.url) | |
exec('fly -t tbd curl api/v1/teams/tbd/cc.xml', (err, stdout, stderr) => { | |
if (err) { | |
console.error(err) | |
} | |
response.end(stdout) | |
}) | |
} | |
const server = http.createServer(requestHandler) | |
server.listen(port, err => { | |
if (err) { | |
return console.error(err) | |
} | |
console.log(`service started on ${port}...`) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment