From 33172b096860b15c37e53da484658eb4920e390c Mon Sep 17 00:00:00 2001 From: CancerAi Date: Tue, 29 Sep 2026 19:38:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BA=86=E8=B7=A8=E5=9F=9F?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E5=88=A0=E9=99=A4=E4=B8=80=E4=BA=9B=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E5=BA=93=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ Dockerfile | 4 ++++ src/index.ts | 2 -- src/utils/random.ts | 4 ---- 4 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 Dockerfile diff --git a/.gitignore b/.gitignore index a14702c..491feb3 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,5 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json # Finder (MacOS) folder config .DS_Store + +build/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b6eeae9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM debian +COPY ./release /app +EXPOSE 8080 +CMD ["/app"] diff --git a/src/index.ts b/src/index.ts index e31d500..3c13316 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,13 +4,11 @@ import { validator } from "hono/validator"; import { postUser } from "./service/postUser"; import { isEmpty } from "./utils/is_empty"; import { getUser } from "./service/getUser"; -import { cors } from "hono/cors"; import { bodyLimit } from "hono/body-limit"; import { getRandom } from "./service/getRandom"; const tmpApp: Hono = new Hono() export const app = tmpApp.basePath("/test/") -app.use("/test/*", cors()) // routers app.get("/user", (c) => { diff --git a/src/utils/random.ts b/src/utils/random.ts index c816dab..ead5c12 100644 --- a/src/utils/random.ts +++ b/src/utils/random.ts @@ -1,7 +1,3 @@ -import type { Context, ContextVariableMap } from "hono" -import { updateExpressionWithTypeArguments } from "typescript/unstable/ast/factory" -import { ApiResponse } from "../modules/api_response" - enum Type { lcLetter = "lcLetter", ucLetter = "ucLetter",