From 526a6674b9ba1d1b894335fcbf232c4723e3f92b Mon Sep 17 00:00:00 2001 From: Florian Maas Date: Tue, 18 Jun 2024 11:03:49 +0200 Subject: [PATCH] next public api url --- frontend/app/utils/search.ts | 2 +- frontend/next.config.mjs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/app/utils/search.ts b/frontend/app/utils/search.ts index 4077460..57f70cd 100644 --- a/frontend/app/utils/search.ts +++ b/frontend/app/utils/search.ts @@ -7,7 +7,7 @@ interface Match { summary: string; } -const apiUrl = process.env.API_URL; +const apiUrl = process.env.NEXT_PUBLIC_API_URL; export const handleSearch = async ( query: string, diff --git a/frontend/next.config.mjs b/frontend/next.config.mjs index a28490c..38cb6a6 100644 --- a/frontend/next.config.mjs +++ b/frontend/next.config.mjs @@ -1,7 +1,8 @@ /** @type {import('next').NextConfig} */ const nextConfig = { env: { - API_URL: process.env.API_URL || "http://localhost:8000", + NEXT_PUBLIC_API_URL: + process.env.NEXT_PUBLIC_API_URL || "http://localhost:8000", }, };