require ('dotenv').config(); const express = require('express'); const {getEnv, PORTS, OLLAMA, logger} = require('@nexusai/shared'); const inferenceRouter = require('./routes/inference'); const app = express(); app.use(express.json()); const PORT = getEnv('PORT', PORTS.INFERENCE); const PROVIDER = getEnv('INFERENCE_PROVIDER', 'ollama'); const MODEL = getEnv('DEFAULT_MODEL', OLLAMA.OLLAMA_MODEL) // Health check endpoint app.get('/health', (req, res) => { res.json({ service: 'Inference Service', status: 'healthy', provider: PROVIDER, model: MODEL }); }); app.use('/', inferenceRouter); // Start the server app.listen(PORT, () => { logger.info(`Inference Service is running on port ${PORT}`); });