Initialize PROMPT environment and ces-control deployment pipeline
PROMPT CI and deployment / verify-and-deploy (push) Successful in 3m53s

This commit is contained in:
2026-10-22 20:43:02 +08:00
commit 68419e3852
17 changed files with 2587 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
export function healthResponse(method: string | undefined, release = "development") {
if (method !== "GET" && method !== "HEAD") {
return { statusCode: 405, body: { error: "Method not allowed" } };
}
return { statusCode: 200, body: { status: "ok", service: "prompt", release } };
}
+6
View File
@@ -0,0 +1,6 @@
import type { AppProps } from "next/app";
import "@/styles/globals.css";
export default function App({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
}
+10
View File
@@ -0,0 +1,10 @@
import type { NextApiRequest, NextApiResponse } from "next";
import { healthResponse } from "@/lib/health";
export default function handler(req: NextApiRequest, res: NextApiResponse) {
const { statusCode, body } = healthResponse(req.method, process.env.RELEASE_SHA);
res.setHeader("Cache-Control", "no-store");
if (statusCode === 405) res.setHeader("Allow", "GET, HEAD");
if (req.method === "HEAD") return res.status(statusCode).end();
return res.status(statusCode).json(body);
}
+1
View File
@@ -0,0 +1 @@
@import "tailwindcss";