diff --git a/frontend/config.js b/frontend/config.js new file mode 100644 index 0000000..658f9c7 --- /dev/null +++ b/frontend/config.js @@ -0,0 +1,3 @@ +export const config = { + baseURL: "http://localhost:8080" +}; \ No newline at end of file diff --git a/frontend/src/dashboardApp.js b/frontend/src/dashboardApp.js index 1f53f85..ce613fc 100644 --- a/frontend/src/dashboardApp.js +++ b/frontend/src/dashboardApp.js @@ -1,4 +1,6 @@ -const baseUrl = "http://localhost:8080/dashboard.php"; +import { config } from "../config"; + +const baseUrl = `${config.baseURL}/dashboard.php`; export function dashboardApp() { return { diff --git a/frontend/src/invoiceApp.js b/frontend/src/invoiceApp.js index 7cdcfc0..a57b6e8 100644 --- a/frontend/src/invoiceApp.js +++ b/frontend/src/invoiceApp.js @@ -1,5 +1,7 @@ -const baseUrl = "http://localhost:8080/invoice.php"; -const menuBaseUrl = "http://localhost:8080/menu.php"; +import { config } from "../config"; + +const baseUrl = `${config.baseURL}/invoice.php`; +const menuBaseUrl = `${config.baseURL}/menu.php`; export function invoiceApp() { return { diff --git a/frontend/src/menuApp.js b/frontend/src/menuApp.js index f9b5894..6ebc906 100644 --- a/frontend/src/menuApp.js +++ b/frontend/src/menuApp.js @@ -1,4 +1,6 @@ -const baseUrl = "http://localhost:8080/menu.php"; +import { config } from "../config"; + +const baseUrl = `${config.baseURL}/menu.php`; export function menuApp() { return {