Skip to content

Instantly share code, notes, and snippets.

@kshitijcode
Created February 17, 2021 03:40
Show Gist options
  • Save kshitijcode/457526c53354ef801029389813d705ce to your computer and use it in GitHub Desktop.
Save kshitijcode/457526c53354ef801029389813d705ce to your computer and use it in GitHub Desktop.
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