Skip to content

Linkmetal/phone-catalog-back

Repository files navigation

Description

Nest application that serves a phone catalog API.

<-- Trello Board -->

It uses Typescript, MongoDB with Mongoose as database, Jest for testing and Swagger for API Docs

Also it uses Cloudinary free tier to host the phone images

Swagger

Api Docs

Installation

$ yarn

Environments file

You have to create a .env file following the template on /.env.example

DATABASE_HOST=
DB_USER=
DATABASE_PASSWORD=
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=

Running the app

# development without database
$ yarn dev

# production mode
$ yarn start:prod

Running the app with docker compose

# .env file
  PROTOCOL=mongodb://
  DB_HOST=mongo:27017
  DB_NAME=/admin
  DB_USER=admin
  DB_PASSWORD=password

# build
$ docker build .

# start container
$ docker compose up -d

Test

# unit tests
$ yarn test

# e2e tests
$ yarn test:e2e

# test coverage
$ yarn test:cov

Stay in touch

About

NestJS application that serves a REST API of a catalog of phones

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published