From d391ce632be29c49a612c64eb5f720238a46844d Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Fri, 17 Jan 2025 16:15:56 +0100 Subject: feat(server): Add all in one http server --- server/frontend/src/index.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'server/frontend/src/index.tsx') 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 = [ - {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(() => {routes}, root!); -- cgit