From ef53588e906ebe87d596454b360c4d13c4fd5cb1 Mon Sep 17 00:00:00 2001 From: Andrew nuark G Date: Sun, 5 Mar 2023 21:54:56 +0700 Subject: [PATCH] Add asyncapi docs endpoint --- src/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/index.ts b/src/index.ts index 8a2d730..4c570c2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ import express from "express"; import http from "http"; +import path from "path"; import { v4 as uuidv4 } from "uuid"; import { Server, Socket } from "socket.io"; @@ -30,6 +31,14 @@ app.get("/", (req, res) => { res.send("

Hello world

"); }); +app.get("/asyncapi", (req, res) => { + res.sendFile(path.resolve(__dirname + "/../assets/asyncapi.html")); +}); + +app.get("/extracted", (req, res) => { + res.sendFile(path.resolve(__dirname + "/../assets/extracted.png")); +}); + app.get("/pallette", (req, res) => { res.json({ availableColors,