feat(middleware): scaffold Node.js/Express/TypeScript project with health endpoint

- package.json with express, better-sqlite3, mqtt, pg, bcrypt, jsonwebtoken, cors
- tsconfig.json targeting ES2022/commonjs
- src/index.ts with GET /health on port 4000
- vitest.config.ts for test runner configuration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-06 12:40:54 +02:00
co-authored by Claude Sonnet 4.6
parent b1085e1ea4
commit 00968a4626
5 changed files with 5508 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import express from 'express';
import cors from 'cors';
const app = express();
const PORT = process.env.PORT ? parseInt(process.env.PORT) : 4000;
app.use(cors());
app.use(express.json());
app.get('/health', (_req, res) => {
res.json({ status: 'ok', timestamp: new Date().toISOString() });
});
if (require.main === module) {
app.listen(PORT, () => {
console.log(`Middleware server running on port ${PORT}`);
});
}
export default app;