Merge branch 'master' of https://github.com/davidmonterocrespo24/wokwi_clon
commit
5b59ebdc30
|
|
@ -1,6 +1,6 @@
|
|||
import axios from 'axios';
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_BASE || 'http://localhost:8001/api';
|
||||
const API_BASE = import.meta.env.VITE_API_BASE || '/api';
|
||||
|
||||
const api = axios.create({ baseURL: API_BASE, withCredentials: true });
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import axios from 'axios';
|
||||
import type { UserResponse } from '../store/useAuthStore';
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_BASE || 'http://localhost:8001/api';
|
||||
const API_BASE = import.meta.env.VITE_API_BASE || '/api';
|
||||
|
||||
const api = axios.create({ baseURL: API_BASE, withCredentials: true });
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import axios from 'axios';
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_BASE || 'http://localhost:8001/api';
|
||||
const API_BASE = import.meta.env.VITE_API_BASE || '/api';
|
||||
|
||||
export interface SketchFile {
|
||||
name: string;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
const API_BASE = `${import.meta.env.VITE_API_BASE || 'http://localhost:8001/api'}/libraries`;
|
||||
const API_BASE = `${import.meta.env.VITE_API_BASE || '/api'}/libraries`;
|
||||
|
||||
export interface ArduinoLibrary {
|
||||
name: string;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import axios from 'axios';
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_BASE || 'http://localhost:8001/api';
|
||||
const API_BASE = import.meta.env.VITE_API_BASE || '/api';
|
||||
|
||||
const api = axios.create({ baseURL: API_BASE, withCredentials: true });
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,14 @@ export default defineConfig({
|
|||
'@wokwi/elements': path.resolve(__dirname, '../wokwi-libs/wokwi-elements/dist/esm'),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ['avr8js', 'rp2040js', '@wokwi/elements'],
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue