adding data-services
This commit is contained in:
parent
e3bfd05b90
commit
405b818c86
139 changed files with 55943 additions and 416 deletions
41
apps/data-services/feature-store/src/index.ts
Normal file
41
apps/data-services/feature-store/src/index.ts
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import { Hono } from 'hono';
|
||||
import { cors } from 'hono/cors';
|
||||
import { logger } from 'hono/logger';
|
||||
|
||||
// Controllers
|
||||
import { HealthController } from './controllers/HealthController';
|
||||
|
||||
const app = new Hono();
|
||||
|
||||
// Middleware
|
||||
app.use('*', cors());
|
||||
app.use('*', logger());
|
||||
|
||||
// Initialize logger for services
|
||||
const appLogger = { info: console.log, error: console.error, warn: console.warn, debug: console.log };
|
||||
|
||||
// Controllers
|
||||
const healthController = new HealthController(appLogger);
|
||||
|
||||
// Health endpoints
|
||||
app.get('/health', healthController.getHealth.bind(healthController));
|
||||
app.get('/health/readiness', healthController.getReadiness.bind(healthController));
|
||||
app.get('/health/liveness', healthController.getLiveness.bind(healthController));
|
||||
|
||||
// API endpoints will be implemented as services are completed
|
||||
app.get('/api/v1/feature-groups', async (c) => {
|
||||
return c.json({ message: 'Feature groups endpoint - not implemented yet' });
|
||||
});
|
||||
|
||||
app.post('/api/v1/feature-groups', async (c) => {
|
||||
return c.json({ message: 'Create feature group endpoint - not implemented yet' });
|
||||
});
|
||||
|
||||
const port = process.env.PORT || 3003;
|
||||
|
||||
console.log(`Feature Store service running on port ${port}`);
|
||||
|
||||
export default {
|
||||
port,
|
||||
fetch: app.fetch,
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue