feat: add email-server-worker with clean template architecture
Add new email-server-worker project implementing a self-scheduling background worker pattern with HTTP monitoring. Removed all business-specific code from copied source, creating a clean, reusable template. Key features: - Self-scheduling worker loop with configurable interval - Graceful shutdown support (Docker-compatible) - Prometheus metrics collection - Health check endpoints (/healthcheck, /metrics, /ping) - Example worker template for easy customization - Comprehensive architecture documentation in CLAUDE.md The worker is now ready for email server implementation with no external dependencies on Evolution/MSSQL/ElasticSearch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
49
email-server-worker/package.json
Normal file
49
email-server-worker/package.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"name": "email-server-worker",
|
||||
"version": "0.1.0",
|
||||
"description": "Background worker service with HTTP health monitoring and metrics collection",
|
||||
"main": "entry.ts",
|
||||
"scripts": {
|
||||
"start": "nodemon ./src/entry.ts",
|
||||
"run-server": "DEBUG=* node --enable-source-maps ./build/entry.js",
|
||||
"build": "ttsc --project ./",
|
||||
"test": "ENV=jest jest --watch"
|
||||
},
|
||||
"author": "Nikola",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"debug": "^2.6.9",
|
||||
"express": "^4.18.2",
|
||||
"http-errors": "^1.7.2",
|
||||
"node-fetch": "^2.6.7",
|
||||
"prom-client": "^14.0.1",
|
||||
"stoppable": "^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-typescript": "^7.18.6",
|
||||
"@types/debug": "^4.1.7",
|
||||
"@types/express": "^4.17.13",
|
||||
"@types/http-errors": "^1.8.1",
|
||||
"@types/jest": "^29.2.5",
|
||||
"@types/node": "^16.10.2",
|
||||
"@types/node-fetch": "^2.6.2",
|
||||
"@types/stoppable": "^1.1.1",
|
||||
"@types/supertest": "^2.0.11",
|
||||
"dotenv": "^16.0.3",
|
||||
"esbuild": "^0.16.14",
|
||||
"esbuild-jest": "^0.5.0",
|
||||
"jest": "^29.3.1",
|
||||
"nodemon": "^2.0.13",
|
||||
"supertest": "^6.3.3",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsconfig-paths": "^4.1.2",
|
||||
"ttypescript": "^1.5.15",
|
||||
"typescript": "^4.9.4",
|
||||
"typescript-transform-paths": "^3.4.4"
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"@babel/preset-typescript"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user