Git Product home page Git Product logo

generator-backdraft's Introduction

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

generator-backdraft's People

Contributors

nishikantaray avatar sumeetweb avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

sumeetweb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.