rename and swagger

main
Ethan Niser 2023-09-14 00:04:32 -05:00
parent fa3b71af17
commit 2ca1201a4d
2 changed files with 5 additions and 4 deletions

@ -1,16 +1,17 @@
import { Elysia } from "elysia";
import { swagger } from "@elysiajs/swagger";
import { staticPlugin } from "@elysiajs/static";
import { todosController } from "./services/todos";
import { todosService } from "./services/todos";
import { BaseHtml } from "./components/base";
import Html from "@kitajs/html";
const app = new Elysia({
name: "@app/main",
})
// .use(swagger())
// @ts-expect-error idk why this is broken
.use(swagger())
.use(staticPlugin())
.use(todosController)
.use(todosService)
.get("/", ({ html }) =>
html(
<BaseHtml>

@ -6,7 +6,7 @@ import Html from "@kitajs/html";
import { db } from "../db";
import { eq } from "drizzle-orm";
export const todosController = new Elysia({
export const todosService = new Elysia({
name: "@app/todos",
prefix: "/todos",
})