Add service dependencies and entry points
This commit is contained in:
1334
package-lock.json
generated
1334
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,11 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node src/index.js",
|
"start": "node src/index.js",
|
||||||
"dev": "node --watch src/index.js"
|
"dev": "node --watch src/index.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@nexusai/shared": "^1.0.0",
|
||||||
|
"dotenv": "^17.4.0",
|
||||||
|
"express": "^5.2.1",
|
||||||
|
"ollama": "^0.6.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
17
packages/embedding-service/src/index.js
Normal file
17
packages/embedding-service/src/index.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
require ('dotenv').config();
|
||||||
|
const express = require('express');
|
||||||
|
const {getEnv} = require('@nexusai/shared');
|
||||||
|
|
||||||
|
const app = express();
|
||||||
|
app.use(express.json());
|
||||||
|
|
||||||
|
const PORT = getEnv('PORT', '3003'); // Default to 3003 if PORT is not set
|
||||||
|
|
||||||
|
// Health check endpoint
|
||||||
|
app.get('/health', (req,res) => {
|
||||||
|
res.json({ service: 'Embedding Service', status: 'healthy' });
|
||||||
|
})
|
||||||
|
|
||||||
|
app.listen(PORT, () => {
|
||||||
|
console.log(`Embedding Service listening on port ${PORT}`);
|
||||||
|
});
|
||||||
@@ -5,5 +5,11 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node src/index.js",
|
"start": "node src/index.js",
|
||||||
"dev": "node --watch src/index.js"
|
"dev": "node --watch src/index.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@nexusai/shared": "^1.0.0",
|
||||||
|
"dotenv": "^17.4.0",
|
||||||
|
"express": "^5.2.1",
|
||||||
|
"ollama": "^0.6.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
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}`);
|
||||||
|
});
|
||||||
@@ -4,9 +4,17 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"start": "node src/index.js",
|
||||||
|
"dev": "node --watch src/index.js"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC"
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"@nexusai/shared": "^1.0.0",
|
||||||
|
"@qdrant/js-client-rest": "^1.17.0",
|
||||||
|
"better-sqlite3": "^12.8.0",
|
||||||
|
"dotenv": "^17.4.0",
|
||||||
|
"express": "^5.2.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
18
packages/memory-service/src/index.js
Normal file
18
packages/memory-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', '3002'); // Default to 3002 if PORT is not set
|
||||||
|
|
||||||
|
// Health check endpoint
|
||||||
|
app.get('/health', (req, res) => {
|
||||||
|
res.json({ service: 'Memory Service', status: 'healthy' });
|
||||||
|
});
|
||||||
|
|
||||||
|
// Start the server
|
||||||
|
app.listen(PORT, () => {
|
||||||
|
console.log(`Memory Service is running on port ${PORT}`);
|
||||||
|
});
|
||||||
@@ -5,5 +5,11 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node src/index.js",
|
"start": "node src/index.js",
|
||||||
"dev": "node --watch src/index.js"
|
"dev": "node --watch src/index.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@nexusai/shared": "^1.0.0",
|
||||||
|
"dotenv": "^17.4.0",
|
||||||
|
"express": "^5.2.1",
|
||||||
|
"node-fetch": "^3.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
27
packages/orchestration-service/src/index.js
Normal file
27
packages/orchestration-service/src/index.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
require ('dotenv').config();
|
||||||
|
const express = require('express');
|
||||||
|
const {getEnv} = require('@nexusai/shared');
|
||||||
|
|
||||||
|
const app = express();
|
||||||
|
app.use(express.json());
|
||||||
|
|
||||||
|
const PORT = getEnv('PORT', '3000'); // Default to 3000 if PORT is not set
|
||||||
|
|
||||||
|
//Service URLS - loaded from .env on each node
|
||||||
|
const MEMORY_URL = getEnv('MEMORY_SERVICE_URL', 'http://localhost:3002');
|
||||||
|
const INFERENCE_URL = getEnv('INFERENCE_SERVICE_URL', 'http://localhost:3001');
|
||||||
|
const EMBEDDING_URL = getEnv('EMBEDDING_SERVICE_URL', 'http://localhost:3003');
|
||||||
|
|
||||||
|
// Health check endpoint
|
||||||
|
app.get('/health', (req, res) => {
|
||||||
|
res.json({
|
||||||
|
service: 'Orchestration Service',
|
||||||
|
status: 'healthy',
|
||||||
|
connections: {MEMORY_URL, INFERENCE_URL, EMBEDDING_URL}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Start the server
|
||||||
|
app.listen(PORT, () => {
|
||||||
|
console.log(`Orchestration Service is running on port ${PORT}`);
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user