Skip to content

Backend of a dog training center management application

License

Notifications You must be signed in to change notification settings

ianlcz/gestidogs-api-server

Repository files navigation

GestiDogs API Server

The objective of this project is the development of a RESTful API to facilitate the management of dog centers.

It was built using NestJS framework, which allows building efficient, reliable and scalable server-side applications.

Development Team

Built with

Installation

You can install the project by cloning this repository:

git clone https://github.com/ianlcz/gestidogs-api-server.git

Install dependencies

First of all, if you have just cloned the repository you have to install the project dependencies with the command npm install in the root folder.

Usage

How to generate a JWT secret ?

On Linux and Mac, type this command openssl rand -hex 32 or go to https://generate-secret.now.sh/32.

Write the .env files

You must copy the .env.example file in the root folder of the application and replace <GESTIDOGS_MONGO_URI>, <GESTIDOGS_JWT_ACCESS_SECRET>, <GESTIDOGS_JWT_REFRESH_SECRET> and <STRIPE_SECRET_API_KEY> with your own :

GESTIDOGS_MONGO_URI=<GESTIDOGS_MONGO_URI>

JWT_ACCESS_SECRET=<GESTIDOGS_JWT_ACCESS_SECRET>
JWT_REFRESH_SECRET=<GESTIDOGS_JWT_REFRESH_SECRET>

STRIPE_API_KEY=<STRIPE_SECRET_API_KEY>

Running

# development mode
$ npm run start

# watch mode
$ npm run start:dev

Then you can go to your browser at http://localhost:8080/docs to see the Swagger documentation of the GestiDogs API Server.

Testing

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Docker

You can launch the API with Docker by following the Docker commands documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.