Skip to content

Repository files navigation

Answer and Question starter NestJS API

Description

This is a repository of a basic Rest API built with NestJS and Prisma, using a PostgreSQL database. The purpose of this application was to implement comprehensive Swagger documentation, following an error handling standard RFC 7807. The API essentially allows creating questions and answers.

Installation

You must have Docker and Nest/CLI installed on your computer. Also, make sure to create the .env and docker-compose.yml files in your project folder.

# Clone the repository
$ git clone https://github.com/davi12345452/question-answer-api.git

# Installing project dependencies
$ npm install

# Creating a container for the PostgreSQL database
$ docker compose up -d

# Applying migrations to the database
$ npx prisma migrate deploy

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

About

API built with NestJS using Prisma, utilizing a PostgreSQL database. This basic API for questions and answers implements an error handling pattern, the RFC 7807.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages