improved logger and added shutdown handler
This commit is contained in:
parent
7c2e055dd4
commit
83e8c44d98
4 changed files with 123 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Data Service - Combined live and historical data ingestion
|
||||
*/
|
||||
import { createLogger } from '@stock-bot/logger';
|
||||
import { createLogger, GracefulShutdownManager } from '@stock-bot/logger';
|
||||
import { loadEnvVariables } from '@stock-bot/config';
|
||||
import { Hono } from 'hono';
|
||||
import { serve } from '@hono/node-server';
|
||||
|
|
@ -11,6 +11,8 @@ loadEnvVariables();
|
|||
|
||||
const app = new Hono();
|
||||
const logger = createLogger('data-service');
|
||||
const shutdownManager = new GracefulShutdownManager(logger);
|
||||
|
||||
const PORT = parseInt(process.env.DATA_SERVICE_PORT || '3002');
|
||||
// Health check endpoint
|
||||
app.get('/health', (c) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue