NestJS + Postgres API

A NestJS 11 REST API with a notes resource on a managed Postgres database, request validation and a health check that tests the database. Click Deploy and Naijacloud builds it from the public repo, creates the Postgres database and connects it, and gives you a live HTTPS address. No GitHub connection needed.

NestJSPostgres

What's inside

  • NestJS 11 with a notes module, list, create, read and delete at /notes
  • Postgres through pg; the table is created on first boot, retrying while the database starts
  • Request validation, and a /healthz that checks the database

What you get after deploying

  • A live address at https://nestjs-postgres-api.naijacloud.app with HTTPS
  • A Postgres database, with DATABASE_URL already set on the service
  • Build and runtime logs, metrics and redeploys from the dashboard

Environment variables

You can change any of these on the deploy screen.

DATABASE_URLPostgres connectionSet by Naijacloud

Run it locally

$ git clone https://github.com/naijacloud/template-nestjs-postgres-api
$ cd template-nestjs-postgres-api
$ cp .env.example .env
$ npm install
$ npm run dev
Learn how it worksConnecting to a database

Whatever you build it with, it ships here.

Deploy your app for free

Free tier forever · No card