Skip to content

Commit

Permalink
Modified the base URL of the app API so that it uses the current host…
Browse files Browse the repository at this point in the history
… in production
  • Loading branch information
mbsantiago committed Nov 8, 2024
1 parent ec406fa commit 01dafb3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion front/src/app/api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import createAPI from "@/lib/api";

const baseURL =
process.env.NODE_ENV === "development"
? process.env.NEXT_PUBLIC_BACKEND_HOST || ""
: "";

const api = createAPI({
baseURL: `${process.env.NEXT_PUBLIC_BACKEND_HOST}`,
baseURL,
withCredentials: true,
});

Expand Down

0 comments on commit 01dafb3

Please sign in to comment.