Skip to content

Commit

Permalink
dashboard: added API_ENDPOINT environment configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
zeim839 committed Apr 8, 2024
1 parent 4e5d06c commit 1ace236
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dashboard/APIController/API.ts
Original file line number Diff line number Diff line change
@@ -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) => {
Expand Down
1 change: 1 addition & 0 deletions dashboard/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const API_ENDPOINT = process.env.NEXT_PUBLIC_API_ENDPOINT || "http://localhost:8080"

0 comments on commit 1ace236

Please sign in to comment.