From 3334abb9d8ac25b1e8dfced961e96b80185f9c5b Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Wed, 25 May 2022 19:27:12 +0200 Subject: [PATCH] Add simple preview interface --- index.js | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/index.js b/index.js index b470c30..0af9a2b 100644 --- a/index.js +++ b/index.js @@ -44,6 +44,49 @@ function attach(docker_id, output_stream) { } router.get("/", async (ctx) => { + ctx.body = /* HTML */ ` + + +
+ + +
+ + +
+ +
+
+ + + `; +}); + +router.get("/preview", async (ctx) => { const s = new Readable({ read() {} }); // stream data ctx.response.set("content-type", "txt/html");