idek
parent
1acd519951
commit
83a37d31df
@ -0,0 +1 @@
|
|||||||
|
import Html from "@kitajs/html";
|
@ -0,0 +1,7 @@
|
|||||||
|
import Elysia from "elysia";
|
||||||
|
import { todosService } from "./todos";
|
||||||
|
|
||||||
|
export const api = new Elysia({
|
||||||
|
name: "@app/api",
|
||||||
|
prefix: "/api",
|
||||||
|
}).use(todosService);
|
@ -1,21 +1,15 @@
|
|||||||
import { Elysia } from "elysia";
|
import { GetHandler } from "../context";
|
||||||
import { ctx } from "../context";
|
|
||||||
import Html from "@kitajs/html";
|
import Html from "@kitajs/html";
|
||||||
import { BaseHtml } from "../components/base";
|
import { BaseHtml } from "../components/base";
|
||||||
|
|
||||||
export const pages = new Elysia({
|
export const get: GetHandler = ({ html }) =>
|
||||||
name: "@app/pages",
|
html(
|
||||||
})
|
<BaseHtml>
|
||||||
.use(ctx)
|
<div
|
||||||
.get("/", ({ html }) =>
|
class="flex w-full h-screen justify-center items-center"
|
||||||
html(
|
hx-get="/api/todos"
|
||||||
<BaseHtml>
|
hx-swap="innerHTML"
|
||||||
<div
|
hx-trigger="load"
|
||||||
class="flex w-full h-screen justify-center items-center"
|
/>
|
||||||
hx-get="/todos"
|
</BaseHtml>
|
||||||
hx-swap="innerHTML"
|
|
||||||
hx-trigger="load"
|
|
||||||
/>
|
|
||||||
</BaseHtml>
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
/// <reference types="lucia" />
|
/// <reference types="lucia" />
|
||||||
declare namespace Lucia {
|
declare namespace Lucia {
|
||||||
type Auth = import("../auth/index").Auth;
|
type Auth = import("../auth/index").Auth;
|
||||||
type DatabaseUserAttributes = {};
|
type DatabaseUserAttributes = {
|
||||||
|
username: string;
|
||||||
|
};
|
||||||
type DatabaseSessionAttributes = {};
|
type DatabaseSessionAttributes = {};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue