From a9ef749247ef3e6d9915ed278654a625dee76c9c Mon Sep 17 00:00:00 2001 From: l2D <20911264+l2D@users.noreply.github.com> Date: Sat, 22 Jun 2024 22:33:43 +0700 Subject: [PATCH 1/2] chore (main.ts): add log message to inform about Swagger UI availability at `/api` route Signed-off-by: l2D <20911264+l2D@users.noreply.github.com> --- cortex-js/src/main.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/cortex-js/src/main.ts b/cortex-js/src/main.ts index c745de9b8..7a77e3d6d 100644 --- a/cortex-js/src/main.ts +++ b/cortex-js/src/main.ts @@ -79,6 +79,7 @@ async function bootstrap() { await app.listen(port, host); console.log(`Started server at http://${host}:${port}`); + console.log(`Swagger UI available at http://${host}:${port}/api`); } bootstrap(); From 8df9139469d974be9e021aa7cf38bd4eb7b069a0 Mon Sep 17 00:00:00 2001 From: l2D <20911264+l2D@users.noreply.github.com> Date: Sat, 22 Jun 2024 22:51:11 +0700 Subject: [PATCH 2/2] docs: update information on accessing Cortex API server & Swagger UI Signed-off-by: l2D <20911264+l2D@users.noreply.github.com> --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index aa2e3804c..753e7911f 100644 --- a/README.md +++ b/README.md @@ -94,8 +94,15 @@ cortex chat tell me a joke To run Cortex as an API server: ```bash cortex serve + +# Output +# Started server at http://localhost:1337 +# Swagger UI available at http://localhost:1337/api ``` +You can now access the Cortex API server at `http://localhost:1337`, +and the Swagger UI at `http://localhost:1337/api`. + ## Build from Source To install Cortex from the source, follow the steps below: