aboutsummaryrefslogtreecommitdiff
path: root/server/frontend/src/index.tsx
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-01-17 16:15:56 +0100
committerLinnea Gräf <nea@nea.moe>2025-01-17 16:15:56 +0100
commitd391ce632be29c49a612c64eb5f720238a46844d (patch)
treea0a8b92c9ec550a5c794fc6edaf9fd71e1621490 /server/frontend/src/index.tsx
parentaa7e28e799ce19f04c6c33782ea8d25ef4c3bb98 (diff)
downloadLocalTransactionLedger-d391ce632be29c49a612c64eb5f720238a46844d.tar.gz
LocalTransactionLedger-d391ce632be29c49a612c64eb5f720238a46844d.tar.bz2
LocalTransactionLedger-d391ce632be29c49a612c64eb5f720238a46844d.zip
feat(server): Add all in one http server
Diffstat (limited to 'server/frontend/src/index.tsx')
-rw-r--r--server/frontend/src/index.tsx20
1 files changed, 10 insertions, 10 deletions
diff --git a/server/frontend/src/index.tsx b/server/frontend/src/index.tsx
index 023872c..6ab7d4e 100644
--- a/server/frontend/src/index.tsx
+++ b/server/frontend/src/index.tsx
@@ -1,21 +1,21 @@
/* @refresh reload */
-import {render} from "solid-js/web";
+import { render } from "solid-js/web";
import "./index.css";
-import type {RouteDefinition} from "@solidjs/router";
-import {Router} from "@solidjs/router";
-import {lazy} from "solid-js";
+import type { RouteDefinition } from "@solidjs/router";
+import { Router } from "@solidjs/router";
+import { lazy } from "solid-js";
const root = document.getElementById("root");
if (!(root instanceof HTMLElement)) {
- throw new Error(
- "Root element not found. Did you forget to add it to your index.html? Or maybe the id attribute got misspelled?"
- );
+ throw new Error(
+ "Root element not found. Did you forget to add it to your index.html? Or maybe the id attribute got misspelled?"
+ );
}
const routes: Array<RouteDefinition> = [
- {path: '/', component: lazy(() => import("./App.tsx"))},
- {path: "/test/", component: lazy(() => import("./Test.tsx"))}
-]
+ { path: "/", component: lazy(() => import("./App.tsx")) },
+ { path: "/test/", component: lazy(() => import("./Test.tsx")) },
+];
render(() => <Router>{routes}</Router>, root!);