frontend: Proxy prod backend for local development (#789)
This commit is contained in:
parent
192553f6ae
commit
cf2fd8e388
|
@ -17,14 +17,13 @@ const dev = {
|
||||||
stats: "errors-only"
|
stats: "errors-only"
|
||||||
},
|
},
|
||||||
historyApiFallback: true,
|
historyApiFallback: true,
|
||||||
// feel free to delete this section if you don't need anything like this
|
proxy: {
|
||||||
onBeforeSetupMiddleware: function (devServer) {
|
'/backend': {
|
||||||
// on port 3000
|
target: 'https://nixos-search-7-1733963800.us-east-1.bonsaisearch.net/',
|
||||||
devServer.app.get("/test", function (req, res) {
|
pathRewrite: {'^/backend' : ''},
|
||||||
res.json({result: "You reached the dev server"});
|
changeOrigin: true
|
||||||
});
|
},
|
||||||
|
},
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue