13 lines
352 B
TypeScript
13 lines
352 B
TypeScript
import { FastifyInstance } from "fastify";
|
|
|
|
export default async function routes(server: FastifyInstance) {
|
|
server.get("/ping", async () => {
|
|
// Testquery gegen DB
|
|
const result = await server.db.execute("SELECT NOW()");
|
|
|
|
return {
|
|
status: "ok",
|
|
db: JSON.stringify(result.rows[0]),
|
|
};
|
|
});
|
|
} |