From 9df8541145c2723ed17878a4536fd8d6ebdf5fd6 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 12 Nov 2021 22:50:40 +0100 Subject: [PATCH] Feature/log logo on server start (#466) * Log logo on server start * Update changelog --- CHANGELOG.md | 6 ++++++ apps/api/src/main.ts | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01144f852..b4277d54b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Added + +- Added a logo to the log on the server start + ## 1.74.0 - 11.11.2021 ### Changed diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index c69f6d141..6fc993ca2 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -2,6 +2,7 @@ import { Logger, ValidationPipe } from '@nestjs/common'; import { NestFactory } from '@nestjs/core'; import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; async function bootstrap() { const app = await NestFactory.create(AppModule); @@ -18,8 +19,23 @@ async function bootstrap() { const port = process.env.PORT || 3333; await app.listen(port, () => { - Logger.log(`Listening at http://localhost:${port}`); + logLogo(); + Logger.log(`Listening at http://localhost:${port}`, '', false); + Logger.log('', '', false); }); } +function logLogo() { + Logger.log(' ________ __ ____ ___', '', false); + Logger.log(' / ____/ /_ ____ _____/ /_/ __/___ / (_)___', '', false); + Logger.log(' / / __/ __ \\/ __ \\/ ___/ __/ /_/ __ \\/ / / __ \\', '', false); + Logger.log('/ /_/ / / / / /_/ (__ ) /_/ __/ /_/ / / / /_/ /', '', false); + Logger.log( + `\\____/_/ /_/\\____/____/\\__/_/ \\____/_/_/\\____/ ${environment.version}`, + '', + false + ); + Logger.log('', '', false); +} + bootstrap();