This repository contains 3rd party REST API boilerplate Express.js, Typescript, TypeORM based.
This repository contains a JSON-API REST API boilerplate using NFW-CORE.
: ESM only, no CommonJS modules.
Any package manager should do the trick but i recommend using Pnpm.
pnpm i
Install the database container.
docker compose up -d
You must create a config/env/<NODE_ENV>.env
file for each env at the root of your project.
The structure of the env file is validated and can be found in the src/api/services/configuration.service.ts
service.
pnpm start:dev
Useful for debugging
pnpm start:test
pnpm mikro-orm:cli <any command>
You need to transpile (or bundle) the Typescript. And then run node against it. it’s up to you.
pnpm tsc
# rollup ...
# docker containers ...
Runs the tests with vitest.
The migrations are run and database is cleared before testing.
pnpm test
With beautiful UI in watch mode and coverage
pnpm test -- --ui --watch --coverage
In watch mode
pnpm test -- --watch