This commit is contained in:
simon.franken
2026-02-16 16:09:07 +01:00
parent d200254783
commit a9228d19c8
8 changed files with 226 additions and 105 deletions

View File

@@ -1,7 +1,7 @@
import axios from 'axios';
import type { User } from '@/types';
import axios from "axios";
import type { User } from "@/types";
const AUTH_BASE = '/auth';
const AUTH_BASE = "/api/auth";
export const authApi = {
login: (): void => {
@@ -22,4 +22,4 @@ export const authApi = {
return null;
}
},
};
};

View File

@@ -1,25 +1,23 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
const backend = "http://127.0.0.1:3001";
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
"@": path.resolve(__dirname, "./src"),
},
},
server: {
port: 5173,
proxy: {
'/api': {
target: 'http://localhost:3001',
changeOrigin: true,
},
'/auth': {
target: 'http://localhost:3001',
"/api": {
target: backend,
changeOrigin: true,
},
},
},
});
});