Add service dependencies and entry points
This commit is contained in:
18
packages/inference-service/src/index.js
Normal file
18
packages/inference-service/src/index.js
Normal file
@@ -0,0 +1,18 @@
|
||||
require ('dotenv').config();
|
||||
const express = require('express');
|
||||
const {getEnv} = require('@nexusai/shared');
|
||||
|
||||
const app = express();
|
||||
app.use(express.json());
|
||||
|
||||
const PORT = getEnv('PORT', '3001'); // Default to 3001 if PORT is not set
|
||||
|
||||
// Health check endpoint
|
||||
app.get('/health', (req, res) => {
|
||||
res.json({ service: 'Inference Service', status: 'healthy' });
|
||||
});
|
||||
|
||||
// Start the server
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Inference Service is running on port ${PORT}`);
|
||||
});
|
||||
Reference in New Issue
Block a user