@express-tool/plugin-common
v2.0.1
Published
The Common plugin provides essential utilities and middleware that are fundamental to any production-grade Express.js application generated by `express-tool`.
Readme
Express Tool Common Plugin
The Common plugin provides essential utilities and middleware that are fundamental to any production-grade Express.js application generated by express-tool.
Installation
This plugin is a standard part of the express-tool scaffolding. To install manually:
npm install @express-tool/plugin-commonFeatures
- Logger: Configured
pinologger for high-performance structured logging. - Error Handling: Centralized global error handling middleware (
AppErrorclass and handler). - Core Middleware: Configures
helmet,cors, andexpress-rate-limitfor security and stability. - Environment config: Sets up
dotenvfor environment variable management.
Usage
This plugin generates:
utils/logger.ts: The logger instance.middleware/errorHandler.ts: The global error handling logic.
License
MIT
