updates
This commit is contained in:
parent
d8de720f8c
commit
287c47d53d
3 changed files with 7 additions and 12 deletions
|
|
@ -3,14 +3,9 @@ services:
|
|||
build:
|
||||
context: ./backend
|
||||
container_name: fastnotes-api
|
||||
# NO ports section at all - Coolify handles this
|
||||
|
||||
ui:
|
||||
build:
|
||||
context: ./frontend
|
||||
args:
|
||||
VITE_API_URL: https://notesapi.fitzythe.dev
|
||||
container_name: fastnotes-ui
|
||||
# NO ports section at all
|
||||
depends_on:
|
||||
- api
|
||||
VITE_API_URL: /api
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ import createClient from "openapi-fetch";
|
|||
import { camelizeKeys, decamelizeKeys } from "humps";
|
||||
import type { paths } from "@/types/api";
|
||||
|
||||
const API_URL =
|
||||
import.meta.env.VITE_API_URL ||
|
||||
(import.meta.env.PROD ? "/api" : "http://localhost:8000/");
|
||||
const API_URL = import.meta.env.PROD
|
||||
? "/api" // ← Same domain, different path
|
||||
: "http://localhost:8000/api";
|
||||
|
||||
// Create the base client with full type safety
|
||||
export const client = createClient<paths>({
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ interface AuthState {
|
|||
clearAll: () => void;
|
||||
}
|
||||
|
||||
const API_URL =
|
||||
import.meta.env.VITE_API_URL ||
|
||||
(import.meta.env.PROD ? "/api" : "http://localhost:8000/");
|
||||
const API_URL = import.meta.env.PROD
|
||||
? "/api" // ← Same domain, different path
|
||||
: "http://localhost:8000/api";
|
||||
|
||||
export const useAuthStore = create<AuthState>()(
|
||||
persist(
|
||||
|
|
|
|||
Loading…
Reference in a new issue