Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
tanish35 committed Oct 10, 2024
1 parent f68a9e6 commit 9a6e43e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 0 additions & 4 deletions frontend/src/main.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App.jsx";
import axios from "axios";

axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL;

ReactDOM.createRoot(document.getElementById("root")).render(<App />);
10 changes: 9 additions & 1 deletion frontend/vercel.json
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
{ "rewrites": [{ "source": "/(.*)", "destination": "/" }] }
{
"rewrites": [
{ "source": "/(.*)", "destination": "/" },
{
"source": "/api/(.*)",
"destination": "https://api123.campusify.site/$1"
}
]
}
8 changes: 8 additions & 0 deletions frontend/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,12 @@ export default defineConfig({
plugins: [tailwindcss()],
},
},
server: {
proxy: {
"/api": {
target: process.env.VITE_BACKEND_URL,
changeOrigin: true,
},
},
},
});

0 comments on commit 9a6e43e

Please sign in to comment.