0.0.2 • Published 1 year ago

dotnest-core v0.0.2

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
1 year ago

Description

Nest framework TypeScript's boilerplate project provides a powerful and feature-rich foundation for developers to build upon, allowing them to focus on building their application's unique features rather than spending time on setup and configuration.

Installation

$ yarn install

Running the app

# development
$ yarn run start

# watch mode
$ yarn run start:dev

# production mode
$ yarn run start:prod

Test

# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn run test:cov

Formatting

# apply prettier code formatter
$ yarn run format

Structure

Project

src\
 |--authentication     # Secure identification and verification of user's access
 |--common             # Commonly used by other modules
 |--config\            # Environment variables and configuration related things
 |--controllers\       # Route controllers (controller layer)
 |--docs\              # Swagger files
 |--enums\             # Enums
 |--middlewares\       # Custom middlewares
 |--models\            # Models (data layer)
     |--entity\        # Entity domain module
         |--repository # Persistent layer
         |--dto        # Data transfer object
         |--service    # Business logic (service layer)
         |--controller # Routes - data flow
         |--profile    # Mapping between source and destination objects  
 |--utils\             # Utility classes and functions
 |--validations\       # Request data validation schemas
 |--jobs\              # Queue consumers/providers and recurring/scheduled
 |--server.ts          # Nest server boostrap
 |--main.ts            # App server entry point

Environment Variables

The environment variables can be found and modified in the .env file.

Docker

Every time you add a new package to your package.json file or make any changes to it or the .env.docker file, please consider rebuilding the docker image using:

docker-compose down && docker-compose up --build

License

Nest is MIT licensed.