1.0.0-alpha.41 • Published 2 years ago

@fabernovel/pes-nx-plugin-nest v1.0.0-alpha.41

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

@fabernovel/pes-nx-plugin-nest

Fabernovel's plugin for api applications

Table of contents

  1. Usage
  2. Installed
  3. Contributing

Usage

Requirements

Inside your project's workspace, add this plugin as a dependency:

pnpm add -D -w @fabernovel/pes-nx-plugin-nest

If you do not have a workspace, refer to @fabernovel/pes-nx-plugin-workspace's README and create one.

Available generators

1. Application

In order to create an API Application, run the following command:

pnpm exec nx g @fabernovel/pes-nx-plugin-nest:application <name> [options]
ArgumentsDescription
<name>Application name (will be requested by the cli if not provided)
OptionsDefaultDescriptionRequired
--tagsTags (string separated by commas). For example: --tags="auth, user"

Note: It's important to note that the Nest application requires a database to function properly. Without a database, the application will crash when served. After generating the Nest application, you have three options for providing a database:

  • Generate a docker-compose file that includes a Postgres database using the nx-plugin-docker tool. Docker documentation
  • Use your own local database.
  • Use a remote database.

Whichever option you choose, you'll need to specify the database identifiers in the .env.local file.


2. Library

In order to create an api library, run the following command:

pnpm exec nx g @fabernovel/pes-nx-plugin-nest:library <name> [options]
ArgumentsDescription
<name>Library name (will be requested by the cli if not provided)
OptionsDefaultDescriptionRequired
--appNameApplication name (will be requested by the cli if not provided):eight_spoked_asterisk:
--sharedfalseAdd the library to libs//shared folder and tag it as shared
--directory:warn: Use at your own discretion. Path of the library (string) after /libs. This is an opt out of our architecture.
--servicetrueInclude a service with the library
--controllertrueInclude a controller with the library.
--moduletrueInclude a module with the library.
--tagsTags (string separated by commas). For example: --tags="auth,user"

3. Logging

winston is used to configure the custom logger for nest apps.

The configutation file for the logger in located in src/app/logging/.

See Nestjs custom logger documentation See winston documentation

Installed

When you'll generate the Nest application, the following technologies will be included:

  • Swagger, to document your code. Learn more here
  • Helmet, to secure the app by setting some http headers. Learn more here
  • TypeORM, is the layer that helps interact with the database(s). Learn more here

Contributing

See the Contributing file.

1.0.0-alpha.41

2 years ago

1.0.0-alpha.38

2 years ago

1.0.0-alpha.37

2 years ago

1.0.0-alpha.39

2 years ago

1.0.0-alpha.40

2 years ago

1.0.0-alpha.36

2 years ago

1.0.0-alpha.35

2 years ago

1.0.0-alpha.34

2 years ago

1.0.0-alpha.30

2 years ago

1.0.0-alpha.32

2 years ago

1.0.0-alpha.31

2 years ago

1.0.0-alpha.33

2 years ago

1.0.0-alpha.27

2 years ago

1.0.0-alpha.26

2 years ago

1.0.0-alpha.29

2 years ago

1.0.0-alpha.28

2 years ago

1.0.0-alpha.25

2 years ago

1.0.0-alpha.19

2 years ago

1.0.0-alpha.9

2 years ago

1.0.0-alpha.8

2 years ago

1.0.0-alpha.7

2 years ago

1.0.0-alpha.6

2 years ago

1.0.0-alpha.10

2 years ago

1.0.0-alpha.5

2 years ago

1.0.0-alpha.16

2 years ago

1.0.0-alpha.15

2 years ago

1.0.0-alpha.18

2 years ago

1.0.0-alpha.17

2 years ago

1.0.0-alpha.12

2 years ago

1.0.0-alpha.11

2 years ago

1.0.0-alpha.14

2 years ago

1.0.0-alpha.13

2 years ago

1.0.0-alpha.21

2 years ago

1.0.0-alpha.20

2 years ago

1.0.0-alpha.23

2 years ago

1.0.0-alpha.22

2 years ago

1.0.0-alpha.24

2 years ago

1.0.0-alpha.4

3 years ago

1.0.0-alpha.3

3 years ago

1.0.0-alpha.2

3 years ago

1.0.0-alpha.1

3 years ago

1.0.0-alpha.0

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago