Initialize PROMPT environment and ces-control deployment pipeline
PROMPT CI and deployment / verify-and-deploy (push) Successful in 3m53s
PROMPT CI and deployment / verify-and-deploy (push) Successful in 3m53s
This commit is contained in:
@@ -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 } };
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import type { AppProps } from "next/app";
|
||||
import "@/styles/globals.css";
|
||||
|
||||
export default function App({ Component, pageProps }: AppProps) {
|
||||
return <Component {...pageProps} />;
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
@import "tailwindcss";
|
||||
Reference in New Issue
Block a user