From a559cc2b50837be7dc86ca6fb9e440dbbb15f897 Mon Sep 17 00:00:00 2001 From: Okiki Ojo Date: Sun, 28 May 2023 02:41:11 +0000 Subject: [PATCH] chore: accept `/` --- mod.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mod.ts b/mod.ts index 2a0d8f4..324d889 100644 --- a/mod.ts +++ b/mod.ts @@ -15,6 +15,12 @@ interface TwoslashRequestOptions extends TwoSlashOptions { const router = new Router(); router.use(cors()); +router.get("/", () => { + return Response.json({ + message: "Hello World! The API is working!", + POST: "/twoslash - Accepts a JSON & Form Data body with the following properties: code, extension, and options." + }) +}); router.post("/twoslash", async ({ request }) => { const headers = request.headers; const contentType = headers.get("content-type"); -- 2.51.2