Created
February 17, 2021 03:40
-
-
Save kshitijcode/457526c53354ef801029389813d705ce to your computer and use it in GitHub Desktop.
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 express = require('express') | |
const app = express() | |
const request = require('request') | |
const port = 3000 | |
app.get('/result', (req, res) => { | |
var response = 'Service A ' | |
request('http://localhost:3001/play', { json: true }, (err, res, body) => { | |
response = response + body | |
}) | |
res.send(response) | |
}) | |
app.listen(port, () => { | |
console.log(`Service A is listening at http://localhost:${port}`) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment