@codeenthusiast09/create-express-app 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # @codeenthusiast09/create-express-app
2
2
 
3
+ [![npm version](https://badge.fury.io/js/@codeenthusiast09%2Fcreate-express-app.svg)](https://www.npmjs.com/package/@codeenthusiast09/create-express-app)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
3
6
  CLI tool to generate production-ready Express TypeScript projects with flexible database options.
4
7
 
5
8
  ## Usage
@@ -69,7 +72,7 @@ The CLI will ask you:
69
72
 
70
73
  ```bash
71
74
  # Clone the repository
72
- git clone <repo-url>
75
+ git clone https://github.com/CodeEnthusiast09/create-express-app.git
73
76
  cd create-express-app
74
77
 
75
78
  # Install dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeenthusiast09/create-express-app",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "CLI tool to generate production-ready Express TypeScript projects with flexible database options (MongoDB, PostgreSQL with Prisma or Drizzle)",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -1,16 +1,25 @@
1
1
  import pinoHttp from 'pino-http';
2
2
  import { Request, Response } from 'express';
3
3
  import { logger } from './logger';
4
+ import '@/types'; // Import to load global type extensions
4
5
 
6
+ /**
7
+ * HTTP Request Logger
8
+ *
9
+ * Logs all incoming requests and responses.
10
+ * Use as middleware: app.use(httpLogger)
11
+ */
5
12
  export const httpLogger = pinoHttp({
6
13
  logger,
7
14
 
15
+ // Custom log level based on status code
8
16
  customLogLevel: (_req, res, err) => {
9
17
  if (res.statusCode >= 500 || err) return 'error';
10
18
  if (res.statusCode >= 400) return 'warn';
11
19
  return 'info';
12
20
  },
13
21
 
22
+ // Add user info to logs if available
14
23
  serializers: {
15
24
  req: (req: Request) => ({
16
25
  method: req.method,