1.0.0-alpha.41 • Published 10 months ago

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

Weekly downloads
-
License
-
Repository
-
Last release
10 months 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

10 months ago

1.0.0-alpha.38

1 year ago

1.0.0-alpha.37

1 year ago

1.0.0-alpha.39

1 year ago

1.0.0-alpha.40

12 months ago

1.0.0-alpha.36

1 year ago

1.0.0-alpha.35

1 year ago

1.0.0-alpha.34

1 year ago

1.0.0-alpha.30

1 year ago

1.0.0-alpha.32

1 year ago

1.0.0-alpha.31

1 year ago

1.0.0-alpha.33

1 year ago

1.0.0-alpha.27

1 year ago

1.0.0-alpha.26

1 year ago

1.0.0-alpha.29

1 year ago

1.0.0-alpha.28

1 year ago

1.0.0-alpha.25

1 year ago

1.0.0-alpha.19

1 year ago

1.0.0-alpha.9

1 year ago

1.0.0-alpha.8

1 year ago

1.0.0-alpha.7

1 year ago

1.0.0-alpha.6

1 year ago

1.0.0-alpha.10

1 year ago

1.0.0-alpha.5

1 year ago

1.0.0-alpha.16

1 year ago

1.0.0-alpha.15

1 year ago

1.0.0-alpha.18

1 year ago

1.0.0-alpha.17

1 year ago

1.0.0-alpha.12

1 year ago

1.0.0-alpha.11

1 year ago

1.0.0-alpha.14

1 year ago

1.0.0-alpha.13

1 year ago

1.0.0-alpha.21

1 year ago

1.0.0-alpha.20

1 year ago

1.0.0-alpha.23

1 year ago

1.0.0-alpha.22

1 year ago

1.0.0-alpha.24

1 year ago

1.0.0-alpha.4

1 year ago

1.0.0-alpha.3

1 year ago

1.0.0-alpha.2

1 year ago

1.0.0-alpha.1

1 year ago

1.0.0-alpha.0

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago