Created
March 16, 2018 18:53
-
-
Save DawTaylor/679d4193d446b655a821f277e9b6eac0 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 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