You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 31, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+66-17Lines changed: 66 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,82 @@
1
-
# Node Skeleton Microservice
1
+
# FW teams Microservice
2
2
3
3
4
4
This repository is the node skeleton microservice to create node microservice for WRI API
5
5
6
-
1.[Getting Started](#getting-started)
6
+
## Dependencies
7
7
8
-
## Getting Started
8
+
You will need [Control Tower](https://github.com/control-tower/control-tower) up and running - either natively or with Docker. Refer to the project's README for information on how to set it up.
9
9
10
-
### OS X
10
+
The FW teams microservice is built using [Node.js](https://nodejs.org/en/), and can be executed either natively or using Docker, each of which has its own set of requirements.
11
11
12
-
**First, make sure that you have the [API gateway running
Start by cloning the repository from github to your execution environment
26
+
27
+
```
28
+
git clone https://github.com/gfw-api/fw-teams.git && cd fw-team
29
+
```
30
+
31
+
After that, follow one of the instructions below:
32
+
33
+
### Using native execution
34
+
35
+
1 - Set up your environment variables. See `dev.env.sample` for a list of variables you should set, which are described in detail in [this section](#environment-variables) of the documentation. Native execution will NOT load the `dev.env` file content, so you need to use another way to define those values
36
+
37
+
2 - Install node dependencies using yarn:
38
+
```
39
+
yarn
40
+
```
41
+
42
+
3 - Start the application server:
43
+
```
44
+
yarn start
45
+
```
46
+
47
+
The endpoints provided by this microservice should now be available through Control Tower's URL.
48
+
49
+
### Using Docker
50
+
51
+
1 - Create and complete your `dev.env` file with your configuration. The meaning of the variables is available in this [section](#configuration-environment-variables). You can find an example `dev.env.sample` file in the project root.
52
+
53
+
2 - Execute the following command to run Control tower:
19
54
20
55
```
21
-
git clone https://github.com/gfw-api/fw-teams
22
-
cd fw-teams
23
56
./team.sh develop
24
-
./team.sh test
25
-
```text
57
+
```
58
+
59
+
The endpoints provided by this microservice should now be available through Control Tower's URL.
60
+
61
+
## Testing
62
+
63
+
There are two ways to run the included tests:
26
64
27
-
You can now access the microservice through the CT gateway.
65
+
### Using native execution
28
66
67
+
Follow the instruction above for setting up the runtime environment for native execution, then run:
68
+
```
69
+
yarn test
29
70
```
30
71
31
-
### Configuration
72
+
### Using Docker
73
+
74
+
Follow the instruction above for setting up the runtime environment for Docker execution, then run:
75
+
```
76
+
./team.sh test
77
+
```
78
+
79
+
## Configuration
32
80
33
81
It is necessary to define these environment variables:
34
82
@@ -38,9 +86,10 @@ It is necessary to define these environment variables:
38
86
* API_GATEWAY_URI => Gateway Service API URL
39
87
* API_GATEWAY_EXTERNAL_URI
40
88
* API_GATEWAY_QUEUE_URL => Url of async queue
41
-
* API_GATEWAY_QUEUE_PROVIDER => redis (only support redis)
42
89
* API_GATEWAY_QUEUE_NAME => mail
43
90
91
+
You can optionally set other variables, see [this file](config/custom-environment-variables.json) for an extended list.
0 commit comments