4 Commits

3 changed files with 5 additions and 3 deletions

View File

@@ -14,7 +14,6 @@ import ApiImplementation from './services/api-implementation';
// Composables // Composables
import { createApp } from 'vue' import { createApp } from 'vue'
process.env.API_IMPLEMENTATION = 'django';
let apiImplementation = new ApiImplementation(); let apiImplementation = new ApiImplementation();
const api = apiImplementation.getApi(); const api = apiImplementation.getApi();

View File

@@ -1,6 +1,6 @@
class DjangoApi { class DjangoApi {
constructor() { constructor() {
this.base = 'http://localhost:7000'; this.base = process.env.DJANGO_BASE_URL;
} }
getCustomers() { getCustomers() {

View File

@@ -46,7 +46,10 @@ export default defineConfig({
vueTemplate: true, vueTemplate: true,
}), }),
], ],
define: { 'process.env': {} }, define: { 'process.env': {
API_IMPLEMENTATION: 'django',
DJANGO_BASE_URL: 'http://localhost:7000'
} },
resolve: { resolve: {
alias: { alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)) '@': fileURLToPath(new URL('./src', import.meta.url))