Spaces:
Building
Building
File size: 400 Bytes
97b4c9b 3f62408 56643f6 97b4c9b 8db509b 9aff024 adf0255 9aff024 97b4c9b 9aff024 3f62408 97b4c9b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
const express = require('express');
const proxy = require('express-http-proxy');
const app = express();
const targetUrl = 'https://api.wolframalpha.com';
const port = 7860;
app.use('/', proxy(targetUrl, {
https: true,
proxyReqOptDecorator: (proxyReqOpts, srcReq) => {
console.log(srcReq, proxyReqOpts);
return proxyReqOpts;
},
}));
app.listen(port, () => {
console.log(`WARP`);
});
|