Skip to content

Features/improvement - #35

Closed
cB-santosh-kumar wants to merge 3 commits into
mainfrom
features/improvement
Closed

cB-santosh-kumar wants to merge 3 commits into
mainfrom
features/improvement

Conversation

@cB-santosh-kumar

Copy link
Copy Markdown
Collaborator

✨ Description

This PR introduces several improvements to the codebase:

  1. Removed body-parser dependency
    Replaced the external body-parser package with Express’s built-in express.json() middleware for cleaner and more efficient request parsing.

  2. Plop file validation
    Added validation to Plop templates to enforce consistent kebab-case naming convention across generated files.

  3. Improved logging system
    Updated logger.js to support multiple transports and added logServerTransport for non-development environments, ensuring better log management in production.


@github-actions

Copy link
Copy Markdown

❌ This PR has 63 commits, which exceeds the limit of 3. Please squash your commits before merging.

@codebucket-sonarqube

Copy link
Copy Markdown

Passed Quality Gate passed

Issues

Measures

Project ID: Codebucket-Solutions_node-template_f63a063e-1f88-4da3-b0be-b4fb5a006098

View in SonarQube

@DaraSingh1998 DaraSingh1998 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review

Inline comments were added on the changed files. See annotations below in the Files tab.


Every thing looks in order.


Summary

Summary of Changes in PR

This pull request introduces several improvements and fixes to the project, focusing on updating dependencies, enhancing validation mechanisms, and refining logging configurations.

app.js

  • Removed bodyParser Middleware: The body-parser middleware has been removed in favor of express.urlencoded() and express.json(). This change simplifies the dependency stack by leveraging built-in Express features.

    Functional Impact: Reduces unnecessary dependencies, potentially improving performance and security by minimizing attack surfaces.

package-lock.json

  • Added Prettier: The prettier package has been added to the development dependencies. This tool ensures consistent code formatting across the project.

    Functional Impact: Enhances code readability and maintainability by enforcing a uniform coding style.

plopfile.js

  • Validation for Kebab Case: Added validation functions to ensure that file and folder names are in kebab-case format (e.g., user-profile, auth-service).

    Functional Impact: Improves project consistency and reduces the risk of naming conflicts or inconsistencies in generated files.

utils/logger.js

  • Log Transport Configuration: The logger configuration has been updated to include log server transports for environments other than development.

    Functional Impact: Ensures that logs are sent to a log server in production and staging environments, aiding in monitoring and debugging.

Overall Summary

The primary intent of this PR is to modernize the project by updating dependencies, enhancing validation mechanisms, and refining logging configurations. These changes aim to improve code quality, maintainability, and performance while ensuring consistent and reliable logging across different environments.

@cB-santosh-kumar
cB-santosh-kumar deleted the features/improvement branch April 24, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants