JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q12887F
  • License MIT

Implying the tool's ability to forge and shape Node.js backend code.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (generator-backdraft) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    image

    Backdraft Code Generator

    npm version License

    Welcome to the Backdraft Generator! This Yeoman generator helps you quickly scaffold a new Node.js application with customizable options.

    Installation

    First, install Yeoman and generator-backdraft using npm (we assume you have pre-installed node.js):

    npm install -g yo
    npm install -g generator-backdraft
    
    Then generate your new project:
    yo backdraft

    Add .env file

    DATABASE_TEST = 
    JWT_SECRET = 
    APP_PORT = 3000
    DATABASE = 
    NODE_ENV = 'test'
    API_VERSION='v1'

    Then Run

    npm start

    Features

    • Quickly scaffold projects with predefined templates and structures.
    • Customizable prompts to gather project-specific information.
    • Supports automatic generation of common code patterns.
    • Easily extensible to include new templates and actions.
    • Designed to enhance your development workflow and productivity.

    Project Structure

    It will generate a Backend boilerplate project like this

    app_name/
    
    │
    ├── config/
    │   └── database.js          # Configuration for database connection
    │
    ├── controller/
    │   └── user.js              # User-related controller logic
    │
    ├── models/
    │   └── user.js              # User model schema
    │
    ├── routes/
    │   ├── index.js             # Main application router
    │   └── user.js              # User-related route definitions
    │
    ├── services/
    │   └── user.js              # User-related business logic
    │
    ├── validators/
    │   ├── joi.validators.js    # Validation schema using Joi
    │   └── index.js             # Exported validation functions
    │
    ├── index.js                 # Application entry point
    └── package.json             # Node.js package configuration

    Prompts

    During project setup, you'll be prompted to answer a few questions to tailor the generated application to your needs.

    1. App Name

      • Type: Input
      • Name: name
      • Message: "App Name"
      • Default: "myapp"
      • Description: Enter the desired name for your application.
    2. App Description

      • Type: Input
      • Name: description
      • Message: "App Description"
      • Default: "My App"
      • Description: Provide a brief description of your application.
    3. Install MongoDB and Mongoose

      • Type: Confirm
      • Name: mongodb
      • Message: "Install MongoDB and Mongoose?"
      • Default: Yes
      • Description: Choose whether to include MongoDB and Mongoose for database integration.
    4. Authentication API

      • Type: Confirm
      • Name: auth
      • Message: "Do you want to add authentication API?"
      • Default: Yes
      • Description: Decide whether to include an authentication API in your application.

    Getting To Know Yeoman

    • Yeoman has a heart of gold.
    • Yeoman is a person with feelings and opinions, but is very easy to work with.
    • Yeoman can be too opinionated at times but is easily convinced not to be.
    • Feel free to learn more about Yeoman.

    License

    MIT © NishikantaRay