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) => {