diff --git a/frontend/.env.example b/frontend/.env.example new file mode 100644 index 0000000..a173b50 --- /dev/null +++ b/frontend/.env.example @@ -0,0 +1 @@ +EXPO_PUBLIC_API_URL=http://10.69.1.137:6060/api/v1 \ No newline at end of file diff --git a/frontend/.gitignore b/frontend/.gitignore index 05647d5..8591fe5 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -33,3 +33,5 @@ yarn-error.* # typescript *.tsbuildinfo + +.env \ No newline at end of file diff --git a/frontend/app/context/AuthContext.js b/frontend/app/context/AuthContext.js index 1a08b36..79dcd4a 100644 --- a/frontend/app/context/AuthContext.js +++ b/frontend/app/context/AuthContext.js @@ -2,7 +2,7 @@ import { createContext, useContext, useEffect, useState } from "react"; import storageUtil from "./storage"; const TOKEN_KEY = "my-jwt"; -export const API_URL = "http://10.69.1.137:6060/api/v1"; +export const API_URL = process.env.EXPO_PUBLIC_API_URL; const AuthContext = createContext(null); export function useAuth() {