Skip to content

A repository boilerplate I built, to practice concepts learnt at work and speed up the development process.

Notifications You must be signed in to change notification settings

alvaropsouza/typescript-user-api-boilerplate

Repository files navigation

User Service

Typescript API boilerplate

NodeJS TypeScript Jest Express.js Prisma Docker Swagger

 

Running project

  1. Install dependencies:
pnpm i

 

  1. Run database locally with Docker:
docker compose up -d

This command should be executed in the same folder as the docker-compose.yml file

 

  1. Generate and run migrations:
pnpm run prisma:gen && pnpm run prisma:mig

 

Visualize Data with Prisma Studio:

npx prisma studio

Will Pop a tab on your navigator in http://localhost:5555 providing you with a basic database ide

 

Init server command:

pnpm run dev

You should now see a message like: "App listening on port 5000"

 

Docs

Visit http://localhost:5000/api-docs/

 

Tests

Tests powered by jest and Prisma-jest plugin

Run all tests:

pnpm run test

Run all tests with coverage:

pnpm run test:cov

For coverage UI, open this file in your browser: coverage\lcov-report\index.html

About

A repository boilerplate I built, to practice concepts learnt at work and speed up the development process.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published