Example Projects
The expressots/examples repository ships 15 focused projects for ExpressoTS v4 (pinned to 4.0.0-preview.3.4 on main). Each example is a standalone app you can clone, run, and test without reading the whole framework first.
Pick one row below, open the GitHub folder, follow its README, then read the linked doc page for the full explanation.
Quick start
git clone https://github.com/expressots/examples.git
cd examples
cd 01-starter-api
npm install
cp .env.example .env
npm run dev
Run the full test matrix from the repo root:
./scripts/test-all.sh
Pre-v4 examples are archived under previousVersions.
All 15 projects
| # | Project | What it teaches | Documentation | GitHub |
|---|---|---|---|---|
| 01 | starter-api | Minimal REST API, middleware preset, health check | First steps | Open |
| 02 | jwt-authentication | JWT, AuthProvider, login, guards | Authentication | Open |
| 03 | authorization-rbac | Roles, permissions, ownership guards | Guards, Authorization | Open |
| 04 | database-inmemory | InMemoryDBProvider, repository pattern | Database integration | Open |
| 05 | database-postgres | PostgreSQL provider, IBootstrap / IShutdown | Database integration | Open |
| 06 | database-prisma | Prisma ORM lifecycle | Database integration | Open |
| 07 | file-upload | @FileUpload, multer | File upload | Open |
| 08 | events | Type-safe events, @OnEvent | Events | Open |
| 09 | message-queue | BullMQ + Redis provider | Lifecycle, Provider ecosystem | Open |
| 10 | redis-cache | Redis cache provider, health checks | Provider ecosystem | Open |
| 11 | testing | Unit, integration, load testing | Testing | Open |
| 12 | docker-compose | Postgres + Redis sidecars, Docker dev | Deployment, Container development | Open |
| 13 | micro-api | micro() lightweight services | Micro API | Open |
| 14 | interceptors | AOP interceptors, @UseInterceptors | Interceptors | Open |
| 15 | openapi-studio | OpenAPI generation + Studio workflow | OpenAPI, Studio | Open |
By topic
| Topic | Examples |
|---|---|
| Getting started | 01-starter-api |
| Authentication & authorization | 02-jwt-authentication, 03-authorization-rbac |
| Databases | 04-database-inmemory, 05-database-postgres, 06-database-prisma |
| HTTP & files | 07-file-upload |
| Async & infrastructure | 08-events, 09-message-queue, 10-redis-cache |
| Quality & ops | 11-testing, 12-docker-compose |
| Advanced | 13-micro-api, 14-interceptors, 15-openapi-studio |
Requirements
- Node.js
>= 20.18.0 - npm (or pnpm/yarn)
- Optional: Docker for Postgres, Redis, and compose-based examples (
05,06integration tests,09,10,12)
Examples 05 and 06 skip database integration tests by default (SKIP_DB=1). Run npm run test:integration when Postgres is available.