We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setupProxy.js
const { createProxyMiddleware } = require("http-proxy-middleware"); module.exports = function (app) { app.use( "/3", createProxyMiddleware({ target: "http://localhost:3000/", headers: { method: "GET", }, changeOrigin: true, }) ); };
root.component.js
const getLocalHostAPI1 = async () => { try { const result = await fetch("/3"); const data = await result.json(); console.log(data) setApi1Response(JSON.stringify(data)); } catch (error) { console.error("Error fetching API", error); } };
no error display in the project but /3 path cannot get data then /3 proxy path not working in single-spa-react. so please fix my problem
The text was updated successfully, but these errors were encountered:
No branches or pull requests
setupProxy.js
const { createProxyMiddleware } = require("http-proxy-middleware");
module.exports = function (app) {
app.use(
"/3",
createProxyMiddleware({
target:
"http://localhost:3000/",
headers: {
method: "GET",
},
changeOrigin: true,
})
);
};
root.component.js
const getLocalHostAPI1 = async () => {
try {
const result = await fetch("/3");
const data = await result.json();
console.log(data)
setApi1Response(JSON.stringify(data));
} catch (error) {
console.error("Error fetching API", error);
}
};
no error display in the project but /3 path cannot get data then /3 proxy path not working in single-spa-react. so please fix my problem
The text was updated successfully, but these errors were encountered: