From 38eeb69fe0b5df50d896836775be700b72eab302 Mon Sep 17 00:00:00 2001 From: Ariel Gentile Date: Tue, 19 Mar 2024 20:24:47 -0300 Subject: [PATCH] feat: show version at start --- README.md | 4 ++++ src/main.ts | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7d2d36f..6bb6846 100644 --- a/README.md +++ b/README.md @@ -78,3 +78,7 @@ docker run -e AGENT_PUBLIC_DID=... -e AGENT_ENDPOINT=... -e AGENT_PORT=yyy -e US ``` where yyy is an publicly accesible port from the host machine. + +## API + +For the moment, some details about Service Agent API can be found in this [Document](./doc/service-agent-api.md). There is some work in progress to make the API available within Swagger: when deployed, just go to [SERVICE_AGENT_ADMIN_BASE_URL]/api. diff --git a/src/main.ts b/src/main.ts index 4b3ecea..275a5b4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,6 +7,8 @@ import { VersioningType } from '@nestjs/common' import { NestFactory } from '@nestjs/core' import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger' +import packageJson from '../package.json' + import { ServiceAgentModule } from './app.module' import { connectionEvents } from './events/ConnectionEvents' import { messageEvents } from './events/MessageEvents' @@ -74,7 +76,7 @@ const run = async () => { messageEvents(agent, conf) console.log( - `Service Agent running in port ${Number(process.env.AGENT_PORT || 3001)}. Admin interface at port ${conf.port}`, + `Service Agent v${packageJson['version']} running in port ${Number(process.env.AGENT_PORT || 3001)}. Admin interface at port ${conf.port}`, ) }