Mobicoop V3 territory service
Go to file
sbriat a743fefe94 basic requirements 2023-02-06 13:50:07 +01:00
ci basic requirements 2023-02-06 13:50:07 +01:00
prisma basic requirements 2023-02-06 13:50:07 +01:00
src basic requirements 2023-02-06 13:50:07 +01:00
.dockerignore basic requirements 2023-02-06 13:50:07 +01:00
.editorconfig basic requirements 2023-02-06 13:50:07 +01:00
.env.dist basic requirements 2023-02-06 13:50:07 +01:00
.env.test basic requirements 2023-02-06 13:50:07 +01:00
.eslintrc.js basic requirements 2023-02-06 13:50:07 +01:00
.gitignore basic requirements 2023-02-06 13:50:07 +01:00
.gitlab-ci.yml basic requirements 2023-02-06 13:50:07 +01:00
.prettierrc basic requirements 2023-02-06 13:50:07 +01:00
Dockerfile basic requirements 2023-02-06 13:50:07 +01:00
LICENSE basic requirements 2023-02-06 13:50:07 +01:00
README.md basic requirements 2023-02-06 13:50:07 +01:00
docker-compose.ci.yml basic requirements 2023-02-06 13:50:07 +01:00
docker-compose.yml basic requirements 2023-02-06 13:50:07 +01:00
jest-e2e.json basic requirements 2023-02-06 13:50:07 +01:00
nest-cli.json basic requirements 2023-02-06 13:50:07 +01:00
package-lock.json basic requirements 2023-02-06 13:50:07 +01:00
package.json basic requirements 2023-02-06 13:50:07 +01:00
tsconfig.build.json basic requirements 2023-02-06 13:50:07 +01:00
tsconfig.json basic requirements 2023-02-06 13:50:07 +01:00

README.md

Mobicoop V3 - Territory Service

Territory data management.

Requirements

You need Docker and its compose plugin.

You also need NodeJS installed locally : we strongly advise to install Node Version Manager and use the latest LTS version of Node (check that your local version matches with the one used in the Dockerfile).

The API will run inside a docker container, but the install itself is made outside the container, because during development we need tools that need to be available locally (eg. ESLint, Prettier...).

A RabbitMQ instance is also required to send / receive messages when data has been inserted/updated/deleted.

Installation

  • copy .env.dist to .env :

    cp .env.dist .env
    

    Modify it if needed.

  • install the dependencies :

    npm install
    
  • start the containers :

    docker compose up -d
    

    The app runs automatically on port 5004.

Database migration

Before using the app, you need to launch the database migration (it will be launched inside the container) :

npm run migrate

Usage

TBD

Messages

TBD

Tests

Tests are run outside the container for ease of use (switching between different environments inside containers using prisma is complicated and error prone). The integration tests use a dedicated database (see db-test section of docker-compose.yml).

# run all tests (unit + integration)
npm run test

# unit tests only
npm run test:unit

# integration tests only
npm run test:integration

# coverage
npm run test:cov

License

Mobicoop V3 - Territory Service is AGPL licensed.