Posts

Showing posts with the label pnpm

Node.js Microservice with NestJS: Part 2 - Using the NestJS CLI

Image
Introducing the Nest CLI The NestJS framework provides a Command Line Interface (CLI) that can be used to generate NestJS projects and components of various types, such as services and controllers. It is build on top of the angular schematics ( @schematics/angular ) code generation framework.  In this second installment on building a NestJS microservice, we will use the Nest CLI to bootstrap our tour-service microservice into the autotoor-app repo. For more details about the service we are building and what we have done so far, check out the following posts: An Overview of the App  - An overiew of the entire application we will be building, both frontend and backend. Node.js Microservice with NestJS: Part 1 - Service Overview  - An overview of the NestJS microservice we will be building. Installing the CLI Since our demo project is using pnpm we will use it to install the Nest CLI as follows: pnpm add -g @nestjs/cli Instructions for installing the Nest CLI in other ways c...

Setting up our monorepo with Turborepo, pnpm, React Native, Expo, and NestJS

Overview In this post we will go over our project setup and build. We will be building both a mobile app using React Native with Expo and an API service using NestJS.  For the purpose of this project I have chosen to use a monorepo where both the mobile app and service code will live.  Within our monorepo, we will modularize our artifacts from the start.  This makes it easier to reuse shared code amongst our different applications, to split up CI/CD, and if we ever want to split into a multi-repo, we will have clear boundaries already in place.   Turborepo and pnpm - A winning combination To enable a fast build with multiple artifacts all living in the same repo, Turborepo and pnpm are some of the top choices.   pnpm is a replacement for npm with a faster build that also takes up less disk space due the the way it shares package files.  Its workspace  feature provides the ability to make one build artifact depend on another artifact in the sa...