Skip to content

Commit

Permalink
build time configs
Browse files Browse the repository at this point in the history
  • Loading branch information
aswanthabam committed Dec 2, 2023
1 parent 1145a2e commit 78971a4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_URL=https://vijnana-backend.vercel.app/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
.firebase
.env

node_modules
dist
Expand Down
5 changes: 2 additions & 3 deletions src/apis/api.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import axios, {
AxiosError,
AxiosRequestConfig,
AxiosResponse,
InternalAxiosRequestConfig,
} from "axios";
import { _EventInfo } from "../types";
import { baseURL } from "../config";

/* set the token */

Expand All @@ -22,9 +20,10 @@ export const get_token = (): string | null => {
};

/* Public Router that passes the token as bearer and get the api domain form config */
export const api_url = import.meta.env.VITE_API_URL;

export const publicRouter = axios.create({
baseURL: baseURL,
baseURL: api_url,
});

publicRouter.interceptors.request.use(
Expand Down
2 changes: 0 additions & 2 deletions src/config.tsx

This file was deleted.

0 comments on commit 78971a4

Please sign in to comment.