mcp-hub-001: Project scaffolding and core server
This commit is contained in:
parent
2b557e1eca
commit
60d92af13b
6 changed files with 916 additions and 0 deletions
23
src/server.js
Normal file
23
src/server.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
const express = require('express');
|
||||
|
||||
const app = express();
|
||||
|
||||
app.use(express.json());
|
||||
|
||||
app.use((req, res, next) => {
|
||||
const start = Date.now();
|
||||
res.on('finish', () => {
|
||||
console.log(`${req.method} ${req.path} ${res.statusCode} ${Date.now() - start}ms`);
|
||||
});
|
||||
next();
|
||||
});
|
||||
|
||||
app.get('/health', (req, res) => {
|
||||
res.json({
|
||||
status: 'ok',
|
||||
uptime: process.uptime(),
|
||||
connectedBackends: 0,
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = app;
|
||||
Loading…
Add table
Add a link
Reference in a new issue