Skip to content

Quickstart

Get a project on screen in under a minute.

Run the scaffolder:

Terminal window
npx create-nestforge@latest

Answer the prompts for a project name and variant — Express + REST or Express + GraphQL — or skip them for automation:

Terminal window
npx create-nestforge@latest --project-name my-app --variant graphql

The project is created in the current directory, named after the project. The CLI copies the template, sets the package name, and creates a .env from the example.

Terminal window
cd my-app
pnpm install
Terminal window
cp .env.example .env

The compose.yaml brings up the whole stack — the app, Redis, Postgres, and a Traefik reverse proxy — with nothing else installed locally:

Terminal window
docker compose up --build

By default the app builds from Dockerfile.dev and runs in watch mode (start:dev). It is served through Traefik at http://localhost.

For a production image, set NODE_ENV=production to build from Dockerfile.production:

Terminal window
NODE_ENV=production docker compose up --build -d

Only need infrastructure, not the app? Start individual services:

Terminal window
docker compose up redis

This route requires Redis running locally:

Terminal window
docker run -p 6379:6379 redis:latest

Then start the app:

Terminal window
pnpm start:dev

The app runs at http://localhost:3000, with Swagger docs at http://localhost:3000/api-docs. In the GraphQL variant, Apollo Sandbox is at http://localhost:3000/graphql.

Read the Introduction for what is inside, or head to the GitHub repository for the full API surface.