nandi/oripublic Fork 0
main
Commits
Clone
git clone https://git.rickub.com/nandi/ori.git
git clone ssh://git@rickub.com/nandi/ori.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

forked from bots-garden/ori

vite.config.ts · 21 lines · 647 BTypeScript Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
/// <reference types="vitest/config" />
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

// In development the SPA runs on Vite's dev server while the Go backend runs
// on :8888; the proxy below forwards the API and WebSocket routes to it. In
// production the Go binary serves the built SPA itself and no proxy exists.
export default defineConfig({
	plugins: [react()],
	server: {
		proxy: {
			"/ws": { target: "ws://localhost:8888", ws: true },
			"/api": { target: "http://localhost:8888" },
			"/healthz": { target: "http://localhost:8888" },
		},
	},
	test: {
		environment: "jsdom",
		globals: true,
	},
});