1.2.7 ā€¢ Published 1 year ago

prodify-s v1.2.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

NestJS API Scaffolding (prodify-s)

This is a supurior package for production level Nestjs application generator, which is can be used as a starting point for any Backend application with NestJS.

Installation šŸ­

$ npm install -g prodify-s

Why another nestJS generator ā“

  1. This generates the API scaffolding with the error handler āš ļø, which is always a good idea.

  2. Only installs the bare bones šŸ’€ and "mostly" required dependencies whenever you try to start a new nestjs application.

Quick Start šŸƒā€ā™‚ļø

The quickest way to get started with nestjs is to utilize the executable prodify-s (OR @prodify-s) to generate an application as shown below:

Create (and start) the app in current folder:

$ nest start .
$ npm run start:dev

OR, create (and start) the app (in myNestApp folder):

$ sj-plz myNestApp OR prodify myNestApp
$ cd myNestApp
$ npm run start:dev

This will basically create this structure in your folder

.
ā”œā”€ā”€ dev.env
ā””ā”€ā”€ local.env
ā””ā”€ā”€ common
ā”œā”€ā”€ node_modules
ā”œā”€ā”€ nest-cli.json
ā”œā”€ā”€ package.json
ā””ā”€ā”€ tsconfig.json
ā””ā”€ā”€ tsconfig.build.js
ā””ā”€ā”€ .prettierrc
ā””ā”€ā”€ .eslintrc.js
ā””ā”€ā”€ .gitignore
ā””ā”€ā”€ test
    ā””ā”€ā”€ app.e2e-spec.ts
    ā””ā”€ā”€ jest-e2e.json
ā””ā”€ā”€ src
    ā””ā”€ā”€ common
        ā””ā”€ā”€ database
            ā””ā”€ā”€ database.config.ts
            ā””ā”€ā”€ database.module.ts
            ā””ā”€ā”€ database.providers.ts
            ā””ā”€ā”€ dbConfig.interface.ts
    ā””ā”€ā”€ constants
        ā””ā”€ā”€ index.ts
    ā””ā”€ā”€ users
        ā””ā”€ā”€ dto
        ā””ā”€ā”€ entities
        ā””ā”€ā”€ users.controller.spec.ts
        ā””ā”€ā”€ users.controller.ts
        ā””ā”€ā”€ users.service.ts
        ā””ā”€ā”€ users.module.ts
        ā””ā”€ā”€ users.service.spec.ts
    ā””ā”€ā”€ util
        ā””ā”€ā”€ db-queries.ts
        ā””ā”€ā”€ response.handler.ts
    ā””ā”€ā”€ app.controller.ts
    ā””ā”€ā”€ app.module.ts
    ā””ā”€ā”€ app.service.ts
    ā””ā”€ā”€ main.ts

This is how easy it is to get going.

What dependencies it installs ?

  • rxjs - nest reactive programming using observable
  • dotenv - for env variables
  • mysql2 - to create mysql db connection
  • nest (dev) - contains all neccessary import files of nest

Command Line Options

Actually NONE is required šŸ˜Š as of now, incase I continue this project OR I'll get requests then certainly this is not the end.

Author āœļø

Sudhakar Jha šŸ‡®šŸ‡³

License šŸŽ«

MIT

Contribute šŸ¤

You can fork this repo and send me a PR.