feat: initialize repository, setup Next.js, shadcn-ui, hono, ...etc

This commit is contained in:
d-kimsuon
2025-08-30 00:07:51 +09:00
commit 301cb51940
28 changed files with 2975 additions and 0 deletions

8
src/server/hono/app.ts Normal file
View File

@@ -0,0 +1,8 @@
import { Hono } from "hono";
// biome-ignore lint/complexity/noBannedTypes: add after
export type HonoContext = {};
export const honoApp = new Hono<HonoContext>().basePath("/api");
export type HonoAppType = typeof honoApp;

20
src/server/hono/route.ts Normal file
View File

@@ -0,0 +1,20 @@
import { zValidator } from "@hono/zod-validator";
import { z } from "zod";
import type { HonoAppType } from "./app";
const helloBodySchema = z.object({
name: z.string(),
});
export const routes = (app: HonoAppType) => {
return (
app
// routes
.get("/hello", zValidator("json", helloBodySchema), (c) => {
const { name } = c.req.valid("json");
return c.json({ message: `Hello ${name}` });
})
);
};
export type RouteType = ReturnType<typeof routes>;