fix: use VITE_NKODE_API_URL env var matching Dokploy build args
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
import { NKodeClient } from 'nkode-client-wasm'
|
import { NKodeClient } from 'nkode-client-wasm'
|
||||||
import type { NKodeSession, IconsResponse, CodeLoginData } from '../types'
|
import type { NKodeSession, IconsResponse, CodeLoginData } from '../types'
|
||||||
|
|
||||||
const API_BASE = import.meta.env.VITE_API_URL || ''
|
const API_BASE = import.meta.env.VITE_NKODE_API_URL || import.meta.env.VITE_API_URL || ''
|
||||||
|
|
||||||
let client: NKodeClient | null = null
|
let client: NKodeClient | null = null
|
||||||
|
|
||||||
|
|||||||
3
src/vite-env.d.ts
vendored
3
src/vite-env.d.ts
vendored
@@ -1,7 +1,8 @@
|
|||||||
/// <reference types="vite/client" />
|
/// <reference types="vite/client" />
|
||||||
|
|
||||||
interface ImportMetaEnv {
|
interface ImportMetaEnv {
|
||||||
readonly VITE_API_BASE_URL: string
|
readonly VITE_NKODE_API_URL: string
|
||||||
|
readonly VITE_API_URL: string
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ImportMeta {
|
interface ImportMeta {
|
||||||
|
|||||||
Reference in New Issue
Block a user