diff --git a/dashboard/APIController/API.ts b/dashboard/APIController/API.ts index d923f4c..81b7e25 100644 --- a/dashboard/APIController/API.ts +++ b/dashboard/APIController/API.ts @@ -1,7 +1,8 @@ import axios, { AxiosResponse, AxiosError } from 'axios' import { TypeSigninBody, TypeSignupBody, APIResponse } from './types' +import { API_ENDPOINT } from '../config' -const RootURL = "http://localhost:8080" +const RootURL = API_ENDPOINT export const GetClient = (id : string) => { return new Promise((resolve: Function, reject: Function) => { diff --git a/dashboard/config.js b/dashboard/config.js new file mode 100644 index 0000000..66c038e --- /dev/null +++ b/dashboard/config.js @@ -0,0 +1 @@ +export const API_ENDPOINT = process.env.NEXT_PUBLIC_API_ENDPOINT || "http://localhost:8080"