feat: set up github endpoint
Node.js CI / Lint and Test (push) Successful in 38s

This commit is contained in:
2025-08-27 17:13:29 -07:00
parent d51b1bed89
commit c48242a141
3 changed files with 729 additions and 0 deletions
+8
View File
@@ -5,7 +5,9 @@
*/
import fastify from "fastify";
import { processGithubEvent } from "../modules/processGitHubEvent.js";
import { logger } from "../utils/logger.js";
import type { GithubPayload } from "../interfaces/github.js";
const html = `<!DOCTYPE html>
<html>
@@ -62,6 +64,12 @@ export const instantiateServer = (): void => {
response.send(html);
});
server.
// eslint-disable-next-line @typescript-eslint/naming-convention -- Fastify standard.
post<{ Body: GithubPayload }>("/github", async(request, response) => {
await processGithubEvent(request, response);
});
server.listen({ port: 7044 }, (error) => {
if (error) {
void logger.error("instantiate server", error);