Implemented a production-ready TypeScript/Express.js service to receive and log MailGun webhook events (delivered, failed, opened, clicked, etc.). Key features: - Webhook endpoint (POST /webhook) with comprehensive event logging - Full TypeScript type definitions for all MailGun event types - Prometheus metrics integration for monitoring - Health check endpoint (GET /ping) - Comprehensive Jest test suite with 87.76% coverage - Docker containerization with build scripts Removed template/example code: - All SQL/MSSQL dependencies and related code - Example auth router and middleware - PRTG metrics support (simplified to Prometheus only) - Unused middleware (CORS, IP whitelist, request parsing/validation) - Template documentation (kept only MailGun webhook API spec) The service is clean, minimal, and focused solely on receiving and logging MailGun webhook events to the console. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
34 lines
1.7 KiB
JSON
34 lines
1.7 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"target": "es2020", // https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping
|
|
"module": "commonjs",
|
|
"esModuleInterop": true, // solves the problem regarding the default importa vs importa *
|
|
"strict": true,
|
|
"sourceMap": true, // please do create source maps
|
|
"skipLibCheck": true, // don't verify typescript of 3rd party modules
|
|
"rootDir": "src", // root directory under which source files are located - it's subtree will be mirrored in "outDir"
|
|
"outDir": "build", // where the build files should be stored
|
|
// "baseUrl" ----- DO NOT USE ... heres why:
|
|
// NOTE: if "baseUrl" is set then Intellisense while doing autocompletion (Ctrl+Space)
|
|
// will use and insert absolute module path instead of relative one,
|
|
// which will make the build fail
|
|
// "baseUrl": "./", // set a base directory to resolve non-absolute module names - This must be specified if "paths" is used
|
|
"plugins": [
|
|
{
|
|
// The following is used for when building the project
|
|
// NOTE: build is done by `ttypescript`
|
|
// which does not know how to interpret what is set in "paths"
|
|
// > this problem is fixed by "typescript-transform-paths"
|
|
"transform": "typescript-transform-paths"
|
|
}
|
|
]
|
|
},
|
|
"include": ["src/**/*"], // location of files which need to be compiled
|
|
// The following is used for debugging the server in VS Code
|
|
// NOTE: when debugging the module is started using `ts-node`,
|
|
// which does not know how to interpret what is set in "paths"
|
|
// > this is fixed by "tsconfig-paths/register"
|
|
"ts-node": {
|
|
"require": ["tsconfig-paths/register"]
|
|
},
|
|
} |