Full NestJS Starter Kit — Part 1 HTTP Endpoints

Andrew Larsen
9 min readDec 29, 2023

At Compoze Labs we tend to use a lot of Fullstack Javascript (with Typescript) for our cloud applications. For our backend services, we’ve experimented with various libraries, patterns, and frameworks over the years. We’ve used Object Oriented, Functional, and a mixture. We’ve used TSOA, vanilla Express, TSyringe, TypeORM, Prisma, etc. Currently, we’ve settled on the more “batteries included” NestJS framework.

In this series of articles I’ll walk through how you can setup your own NestJS starter kit, similar to what we use for our cloud applications. We’ll focus on the following areas:

  1. Example GET, PUT, and POST endpoints
  2. Security (Authentication & Authorization)
  3. Environment Configuration
  4. Logging, Tracing, & Metrics
  5. API Documentation
  6. Exception Handling
  7. Integration with a database
  8. Dockerization & Deployment readiness

We’ll cover each section in a separate article. For this one, we’ll focus on bootstrapping our application and setting up GET, PUT, and POST endpoints.

Bootstrap the project

To get started, let’s use the NestJS cli to bootstrap our starter kit.

--

--