README.md 1.28 KB
Newer Older
1
2
# Organizations service

3
4
## Installation

5
6
7
8
This service has been developed with the [NestJS](https://nestjs.com/) framework. It requires [Node.js](https://nodejs.org/en/) in order to run.

Once Node.js installed on your computer, you will need to install the project's dependencies. Go to the root of the project and run the following command.

9
```bash
10
npm install
11
12
```

13
14
## Environment variables

15
16
17
18
19
20
21
In order to run the code, some environment variables are needed. They are specified in the `template.env` file at the root of the project.

For a local deployment:

1. `cp template.env .env`
2. Edit .env according to the chosen configuration

22
The values will be read from the file by default when running with docker. If you run the service outside of docker you can export those variables.
23
24

## Running the app without docker
25

26
You will need to provide a healthy connection to a database in order for the service to start.
27
28
29

```bash
# development
30
npm run start
31
32

# watch mode
33
npm run start:dev
34
35

# production mode
36
npm run start:prod
37
38
```

39
40
41
42
## Running the app with docker

```bash
# build
43
docker-compose build
44
45

# deploy
46
docker-compose up [-d]
47
48

# build and deploy
49
docker-compose up --build [-d]
50
51
52
```

<!-- ## Test
53
54
55
56
57
58
59
60
61
62

```bash
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov
63
``` -->