fix
This commit is contained in:
parent
bd8a5bfe9e
commit
eb66086b2a
5 changed files with 59 additions and 37 deletions
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
import { Hono } from 'hono';
|
||||
import { cors } from 'hono/cors';
|
||||
import { initializeConfig, getServiceConfig, getLoggingConfig, getDatabaseConfig } from '@stock-bot/config-new';
|
||||
import { initializeServiceConfig } from '@stock-bot/config-new';
|
||||
import { getLogger, shutdownLoggers, setLoggerConfig } from '@stock-bot/logger';
|
||||
import { createAndConnectMongoDBClient, MongoDBClient } from '@stock-bot/mongodb-client';
|
||||
import { createAndConnectPostgreSQLClient, PostgreSQLClient } from '@stock-bot/postgres-client';
|
||||
|
|
@ -13,13 +13,13 @@ import { setPostgreSQLClient, setMongoDBClient } from './clients';
|
|||
import { exchangeRoutes } from './routes/exchange.routes';
|
||||
import { healthRoutes } from './routes/health.routes';
|
||||
|
||||
// Initialize configuration
|
||||
await initializeConfig();
|
||||
const serviceConfig = getServiceConfig();
|
||||
const databaseConfig = getDatabaseConfig();
|
||||
// Initialize configuration with automatic monorepo config inheritance
|
||||
const config = await initializeServiceConfig();
|
||||
const serviceConfig = config.service;
|
||||
const databaseConfig = config.database;
|
||||
|
||||
// Initialize logger with config
|
||||
const loggingConfig = getLoggingConfig();
|
||||
const loggingConfig = config.logging;
|
||||
if (loggingConfig) {
|
||||
setLoggerConfig({
|
||||
logLevel: loggingConfig.level,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue