Skip to content

Commit

Permalink
fix: 🩹 fix issue #35
Browse files Browse the repository at this point in the history
  • Loading branch information
Mozart409 committed May 12, 2023
1 parent f198faa commit 14affc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ const getFullUrl = (url: string) => {
let baseUrl: string = ''

if (process.env.NODE_ENV === 'production') {
let API_URL = process.env.API_URL
let API_URL = import.meta.env.API_URL
if (API_URL === undefined) {
throw new Error('API_URL is undefined. Please set it in .env file.')
}
baseUrl = process.env.API_URL + '/api'
baseUrl = import.meta.env.API_URL + '/api'
} else {
baseUrl = 'http://localhost:4000/api'
}
Expand Down

0 comments on commit 14affc8

Please sign in to comment.