Created
September 14, 2020 18:41
-
-
Save moeiscool/3bb8c93892bdd917750b6830369279b8 to your computer and use it in GitHub Desktop.
superBasicProxy.js
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 request = require('request') | |
const express = require('express') | |
const app = express() | |
const port = 3000 | |
app.get('/', (req, res) => { | |
request('https://google.ca', function(err, requestResponse, body) { | |
res.end(body) | |
}) | |
}) | |
app.listen(port, () => { | |
console.log(`Example app listening at http://localhost:${port}`) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment