Add asyncapi docs endpoint

This commit is contained in:
Andrew 2023-03-05 21:54:56 +07:00
parent 7f63fb4a0e
commit ef53588e90

View file

@ -1,5 +1,6 @@
import express from "express"; import express from "express";
import http from "http"; import http from "http";
import path from "path";
import { v4 as uuidv4 } from "uuid"; import { v4 as uuidv4 } from "uuid";
import { Server, Socket } from "socket.io"; import { Server, Socket } from "socket.io";
@ -30,6 +31,14 @@ app.get("/", (req, res) => {
res.send("<h1>Hello world</h1>"); res.send("<h1>Hello world</h1>");
}); });
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) => { app.get("/pallette", (req, res) => {
res.json({ res.json({
availableColors, availableColors,