File size: 228 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import fetch from 'node-fetch'

export default async (req, res) => {
  const dataRes = await fetch(
    `http://localhost:${req.query.port}/api/query?hello=from-pipe`
  )

  res.status(dataRes.status)
  dataRes.body.pipe(res)
}