This template provides a minimal setup to get React working in Vite with HMR and Brahma-Firelight (A Rust based high speed server writen on top of TOKIO & HYPER)
npm install
npm run build
npm run devimport { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
proxy: {
"/api": {
target: "http://localhost:2000", // your backend port (brahma-firelight API)
changeOrigin: true,
secure: false,
},
},
},
});