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