@@ -4,12 +4,13 @@ import * as trpcExpress from '@trpc/server/adapters/express';
44import { initializeDatabase } from './database' ;
55import { appRouter } from './trpc/router' ;
66import { SocketManager } from './trpc/socket' ;
7- import { ConfigManager } from '../../shared/src/config' ;
7+ import { ConfigManager , APP_INFO } from '../../shared/src/config' ;
88import path from 'path' ;
99import opener from 'opener' ;
1010import { promptUser } from '../../shared/src/utils/terminal' ;
1111import portfinder from 'portfinder' ;
1212import otelRouter from './otel/router' ;
13+ import { displayBanner } from '../../shared/src/utils/banner' ;
1314
1415async function initializeServer ( ) {
1516 try {
@@ -43,6 +44,7 @@ async function initializeServer() {
4344
4445 // Initialize the database
4546 await initializeDatabase ( config . database ) ;
47+ console . log ( '✔ Database initialized successfully' ) ;
4648
4749 // Set TRPC router
4850 app . use (
@@ -82,9 +84,19 @@ async function initializeServer() {
8284
8385 httpServer . listen ( configManager . getConfig ( ) . port , ( ) => {
8486 const actualPort = configManager . getConfig ( ) . port ;
85- console . log (
86- `Server running on port ${ actualPort } in ${ process . env . NODE_ENV } mode ...` ,
87- ) ;
87+ const config = configManager . getConfig ( ) ;
88+ const mode = ( process . env . NODE_ENV || 'production' ) as
89+ | 'development'
90+ | 'production' ;
91+
92+ // Display startup banner
93+ displayBanner ( {
94+ appName : APP_INFO . name ,
95+ version : APP_INFO . version ,
96+ port : actualPort ,
97+ databasePath : config . database . database ,
98+ mode : mode ,
99+ } ) ;
88100
89101 if ( process . env . NODE_ENV === 'production' ) {
90102 opener ( `http://localhost:${ actualPort } /home` ) ;
0 commit comments