Vipcube / demo-nestjs

The demo projects let me know about the 3rd-party infra how to work with nestjs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo NestJS Monorepo with microservices

This monorepo project was generated using Nx.

This project is mainly used for learning/trial about nestjs and boilerplate purposes only.

Implements Overview

This Microservice implements the following:

Install

npm install --legacy-peer-deps

legacy-peer-deps flags for old peer dependencies.

Generate an application

Run nx g @nrwl/nest:app my-app to generate an application.

You can use any of the plugins above to generate applications as well.

When using Nx, you can create multiple applications and libraries in the same workspace.

Generate a library

Run nx g @nrwl/nest:lib my-lib to generate a library.

You can also use any of the plugins above to generate libraries as well. Example: @nrwl/workspace, @nrwl/js, @nrwl/node

Libraries are shareable across libraries and applications. They can be imported from @demo-nestjs/mylib.

Development server

Run nx serve my-app for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Build

Run nx build my-app to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Docker Build

Run nx docker my-app to build the project with docker.

Running unit tests

Run nx test my-app to execute the unit tests via Jest.

Run nx affected:test to execute the unit tests affected by a change.

Understand your workspace

Run nx graph to see a diagram of the dependencies of your projects.

Further help

Visit the Nx Documentation to learn more.

About

The demo projects let me know about the 3rd-party infra how to work with nestjs.


Languages

Language:TypeScript 90.6%Language:Dockerfile 8.9%Language:JavaScript 0.5%