feat: centralize the base url config in frontend js part
This commit is contained in:
parent
e473c9e5c8
commit
8e918eb02a
3
frontend/config.js
Normal file
3
frontend/config.js
Normal file
@ -0,0 +1,3 @@
|
||||
export const config = {
|
||||
baseURL: "http://localhost:8080"
|
||||
};
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user