From 095f3dae76c0fd4bc705010cf8b5bb1e7b33c9f4 Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 5 Aug 2025 20:17:46 +0300 Subject: [PATCH] add environment variable for API URL and update client configuration --- .env.example | 1 + src/hey-api-config.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..1534303 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +NEXT_PUBLIC_API_URL=http://api.example.com/api \ No newline at end of file diff --git a/src/hey-api-config.ts b/src/hey-api-config.ts index 22fd0a6..96c5dd9 100644 --- a/src/hey-api-config.ts +++ b/src/hey-api-config.ts @@ -1,6 +1,6 @@ -import type { CreateClientConfig } from "@/lib/client/client.gen"; +import type {CreateClientConfig} from "@/lib/client/client.gen"; export const createClientConfig: CreateClientConfig = config => ({ ...config, - baseUrl: "http://crm.logidex.ru/api", + baseUrl: process.env.NEXT_PUBLIC_API_URL, });