New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

nestjs-module-generator

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nestjs-module-generator

A CLI tool to generate NestJS modules with folder structure and boilerplate files.

latest
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

nestjs-module-generator

A command-line tool for generating NestJS modules with the necessary folder structure and boilerplate files. It automates the creation of common files like controllers, services, DTOs, entities, and interfaces, making it easy to quickly scaffold new modules in your NestJS application.

Table of Contents

  • Installation
  • Usage
  • Features
  • License

Installation

To install the package globally and use the CLI tool, run the following command:

npm install -g nestjs-module-generator

If you want to use it locally within your project:

npm install nestjs-module-generator --save-dev

Usage

Once the package is installed, you can use the generate-module command to create a new NestJS module with all the necessary boilerplate files.

Command Syntax:

generate-module <module-name>

Where <module-name> is the name of the module you want to create (e.g., products, users, etc.).

Example:

To create a module for products:

generate-module products

This will generate the following folder structure:

  products/
  ├── products.controller.ts
  ├── products.service.ts
  ├── products.module.ts
  ├── dto/
  │   ├── create-products.dto.ts
  │   └── update-products.dto.ts
  ├── entities/
  │   └── products.entity.ts
  └── interfaces/
      └── products.interface.ts
  

Each file is pre-configured with the necessary boilerplate for a typical NestJS module, ready for you to start implementing business logic.

Features

  • Controller: Generates a basic controller with a route setup.
  • Service: Generates a basic service class.
  • Module: Generates the module file with necessary imports and providers.
  • DTOs: Generates DTOs for creating and updating entities.
  • Entities: Generates the entity file (using TypeORM).
  • Interfaces: Generates an interface for the module.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Feel free to open issues and submit pull requests for enhancements or bug fixes. All contributions are welcome!

Support

For support, please open an issue in the GitHub repository or contact the author directly.

Keywords

nestjs

FAQs

Package last updated on 08 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts