33 lines
634 B
JavaScript
33 lines
634 B
JavaScript
|
|
import Fastify from "fastify";
|
||
|
|
import apophisPlugin from "../../../index.js";
|
||
|
|
|
||
|
|
const app = Fastify({ logger: false });
|
||
|
|
|
||
|
|
await app.register(import("@fastify/swagger"), {
|
||
|
|
openapi: {
|
||
|
|
info: { title: "Verify No Contracts", version: "1.0.0" },
|
||
|
|
},
|
||
|
|
});
|
||
|
|
|
||
|
|
await app.register(apophisPlugin, { runtime: "off" });
|
||
|
|
|
||
|
|
app.get(
|
||
|
|
"/health",
|
||
|
|
{
|
||
|
|
schema: {
|
||
|
|
description: "Health check route with schema only",
|
||
|
|
response: {
|
||
|
|
200: {
|
||
|
|
type: "object",
|
||
|
|
properties: {
|
||
|
|
status: { type: "string" },
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
async () => ({ status: "ok" }),
|
||
|
|
);
|
||
|
|
|
||
|
|
export default app;
|