http-system-logger 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "http-system-logger",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "A lightweight and configurable logging library for Node.js applications, built with winston and morgan.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1 +0,0 @@
1
- export {};
@@ -1,27 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const express_1 = __importDefault(require("express"));
7
- const src_1 = require("../src");
8
- const app = (0, express_1.default)();
9
- const logger = new src_1.Logger('TestApp');
10
- // Middleware to parse JSON requests
11
- app.use(express_1.default.json());
12
- // Use the HTTP logger middleware
13
- app.use(src_1.httpLogger);
14
- // Test route
15
- app.get('/api/test', (req, res) => {
16
- logger.info('Test route accessed');
17
- res.send('Test route is working!');
18
- });
19
- // Ignored route
20
- app.get('/api/health', (req, res) => {
21
- res.send('Health check route');
22
- });
23
- // Start the server
24
- const PORT = 3000;
25
- app.listen(PORT, () => {
26
- logger.info(`Test server is running on http://localhost:${PORT}`);
27
- });
File without changes
File without changes
File without changes