With the help of mirajeJS, we can simulate routes, but is it possible, if such a route is not simulated in mirajeJS, to redirect it and use a real server using axios?
import {Server} from "miragejs";
new Server({
routes() {
this.namespace = "api/";
this.get("test/router", () => {
return [
{name: "Angy", surname: "T."},
{name: "Chris", surname: "B."},
{name: "Juliana", surname: "Crain"}
];
});
}
});
That is, I want to achieve the following behavior, I wet the test / router request, but if the user makes any other request that is not locked in Miraje, then it goes to the real server, that is, the real request is used