Files
jp 0917366cdf Separate JSON API backend (vm_api.py) + React+TanStack frontend scaffold
- vm_api.py: pure FastAPI JSON API on :8098 with CORS
- vm-api.service: systemd unit for API (replaces inline HTML vm_web.py for frontend)
- vm_web.py: kept intact as fallback; Apache now proxies /api/ -> :8098
- frontend/: Vite + React + TanStack Query scaffold
- Apache vhost updated: DocumentRoot -> frontend/dist, /api/ proxy, SPA fallback
- All original HTML pages still functional via :8099 during transition
2026-08-13 17:42:33 +01:00

26 lines
872 B
JavaScript

import { getStoreFactory } from "./routerStores.js";
import { RouterCore } from "@tanstack/router-core";
//#region src/router.ts
/**
* Creates a new Router instance for React.
*
* Pass the returned router to `RouterProvider` to enable routing.
* Notable options: `routeTree` (your route definitions) and `context`
* (required if the root route was created with `createRootRouteWithContext`).
*
* @param options Router options used to configure the router.
* @returns A Router instance to be provided to `RouterProvider`.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouterFunction
*/
var createRouter = (options) => {
return new Router(options);
};
var Router = class extends RouterCore {
constructor(options) {
super(options, getStoreFactory);
}
};
//#endregion
export { Router, createRouter };
//# sourceMappingURL=router.js.map