From 96404aed4d718be28b7eac2e09a2b9e36778079d Mon Sep 17 00:00:00 2001 From: Ruidy Date: Wed, 14 Jul 2021 16:57:31 +0200 Subject: [PATCH] fix: new backend url --- .env.local | 1 + api/index.ts | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 .env.local diff --git a/.env.local b/.env.local new file mode 100644 index 0000000..7843211 --- /dev/null +++ b/.env.local @@ -0,0 +1 @@ +NEXT_PUBLIC_API_URL="http://localhost:9000/bills" \ No newline at end of file diff --git a/api/index.ts b/api/index.ts index 90a3141..58da33d 100644 --- a/api/index.ts +++ b/api/index.ts @@ -1,8 +1,7 @@ import axios from "axios"; import { Bill, BillForm } from "../types/bill"; -const BASE_URL = "http://localhost:9000/bills"; - +const BASE_URL = process.env.NEXT_PUBLIC_API_URL const client = axios.create({ baseURL: BASE_URL }); export const createBill = async (data: BillForm) => {