Skip to content

Instantly share code, notes, and snippets.

@DawTaylor
Created March 16, 2018 18:53
Show Gist options
  • Save DawTaylor/679d4193d446b655a821f277e9b6eac0 to your computer and use it in GitHub Desktop.
Save DawTaylor/679d4193d446b655a821f277e9b6eac0 to your computer and use it in GitHub Desktop.
const express = require('express')
const axios = require('axios')
const app = express()
const url = process.env['BASE_URL']
app.get('/*', (req, res) => {
axios.get(`${url}${req.url}`, {
headers: {
'Accept': 'application/json'
}
}).then(response => res.json(response.data))
.catch(res.err)
})
app.listen(8080, () => console.log('Running'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment