Created
December 28, 2019 04:55
-
-
Save seeya/c307f62b712fb4e1468673aefbba1f97 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 app = express(); | |
const ROUTE = "https://restaurant-1257666530.file.myqcloud.com"; | |
app.get('/*', (req, res, next) => { | |
let proxy = `${ROUTE}${req.path}`; | |
console.log(proxy); | |
if(req.path.indexOf("project.manifest") !== -1) { | |
return res.sendFile("./project.manifest"); | |
} | |
res.send(proxy); | |
}); | |
app.listen(80); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment