Skip to content

Commit

Permalink
Deploy: 프로덕션 서버 api 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
KimCookieYa committed Feb 17, 2024
1 parent e2fed1d commit e084ca4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
VITE_APP_TITLE=메일 받아라
VITE_APP_TITLE_EN=MailBadara
VITE_GOOGLE_MAIL_USER_ID=[email protected]
VITE_GITHUB_OWNER=KimCookieYa
VITE_GITHUB_REPO=PNU_Mail_Badara
VITE_GITHUB_OWNER=mailbadara
VITE_GITHUB_REPO=homepage
VITE_SERVER_API_URL=https://api.mailbadara-cookiya.koyeb.app/
PORT=8000
15 changes: 11 additions & 4 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App.tsx";
import "./index.css";
import axios from "axios";

ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<App />
</React.StrictMode>
async function initAxios() {
axios.defaults.baseURL = import.meta.env.VITE_SERVER_API_URL;
}

initAxios().then(() =>
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<App />
</React.StrictMode>
)
);

0 comments on commit e084ca4

Please sign in to comment.