Skip to content

Instantly share code, notes, and snippets.

@sergueyarellano
Created May 26, 2021 18:35
Show Gist options
  • Save sergueyarellano/0567ba585975ae772e1f0b493c76800d to your computer and use it in GitHub Desktop.
Save sergueyarellano/0567ba585975ae772e1f0b493c76800d to your computer and use it in GitHub Desktop.
app.get('/stores', async (req, res) => {
const config = {
host: 'http://localhost:3010',
endpoint: 'data',
method: 'GET',
headers: { 'content-type': 'application/json' }
}
const responseBody = await pipe(
composeRequest,
makeRequest,
mapResponse
)(lift(config))
res.json(responseBody)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment