I'm trying to send a GET request to an external link [1]: https://bpdts-test-app.herokuapp.com/user/3 in attempt to store the data locally and manipulate it.
After using http-proxy-server I was able to access this link and display the data on a certain route. However, I'm unsure as how and where to create the GET request using axios.
My server.js file is as follows
const express = require("express");
const { createProxyMiddleware } = require("http-proxy-middleware");
const allRoutes = require("./routes/allRoutes");
const app = express();
app.use(
"/user/3",
createProxyMiddleware({
target: "https://bpdts-test-app.herokuapp.com",
changeOrigin: true,
ws: true,
logLevel: "debug"
})
);
app.listen(5000, () => console.log("Server running on 5000"));