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 Mar 13, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+21-13Lines changed: 21 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
## Dependencies
4
4
5
5
- Nodejs (v10)
6
-
-Mongodb (v4)
6
+
-AWS DynamoDB
7
7
8
8
## Configuration
9
9
@@ -12,16 +12,26 @@ The following parameters can be set in config files or in env variables:
12
12
13
13
- LOG_LEVEL: the log level
14
14
- PORT: the server port
15
-
- MONGODB_URL: Mongo DB URL
16
15
- CHALLENGE_API_URL: the Topcoder challenge API URL
17
16
- MEMBER_API_URL: the Topcoder member API URL
18
-
- GROUP_IDS: the valid group ids
19
17
- AUTH0_URL: Auth0 URL, used to get TC M2M token
20
18
- AUTH0_AUDIENCE: Auth0 audience, used to get TC M2M token
21
19
- TOKEN_CACHE_TIME: Auth0 token cache time, used to get TC M2M token
22
20
- AUTH0_CLIENT_ID: Auth0 client id, used to get TC M2M token
23
21
- AUTH0_CLIENT_SECRET: Auth0 client secret, used to get TC M2M token
24
22
- AUTH0_PROXY_SERVER_URL: Proxy Auth0 URL, used to get TC M2M token
23
+
- AMAZON.AWS_ACCESS_KEY_ID: The Amazon certificate key to use when connecting. For local dynamodb you can set fake value.
24
+
- AMAZON.AWS_SECRET_ACCESS_KEY: The Amazon certificate access key to use when connecting. For local dynamodb you can set fake value.
25
+
- AMAZON.AWS_REGION: The Amazon region to use when connecting. For local dynamodb you can set fake value.
26
+
- AMAZON.DYNAMODB_READ_CAPACITY_UNITS: the AWS DynamoDB read capacity units
27
+
- AMAZON.DYNAMODB_WRITE_CAPACITY_UNITS: the AWS DynamoDB write capacity units
28
+
- AMAZON.IS_LOCAL_DB: Use local or AWS Amazon DynamoDB
29
+
- AMAZON.DYNAMODB_URL: The local url, if using local Amazon DynamoDB
30
+
- HEALTH_CHECK_TIMEOUT: health check timeout in milliseconds
31
+
32
+
## Local DynamoDB
33
+
Change to the ./docker-dynamodb directory and run `docker-compose up`.
34
+
An instance of DynamoDB listening on port `8000` will be initialized inside docker.
25
35
26
36
## Local deployment
27
37
@@ -39,6 +49,12 @@ npm run lint
39
49
npm run lint:fix # To fix possible lint errors
40
50
```
41
51
52
+
- Make sure DynamoDB instance is up and create tables
53
+
54
+
```bash
55
+
npm run create-tables
56
+
```
57
+
42
58
- Clear and Insert data into database
43
59
44
60
```bash
@@ -57,16 +73,8 @@ npm start
57
73
58
74
For verification purpose, we need a mock app for Topcoder Challenge API and Topcoder Member API. You can run command `npm run mock-api` to start the mock app.
59
75
60
-
## Heroku Deployment
61
-
62
-
- git init
63
-
- git add .
64
-
- git commit -m init
65
-
- heroku create
66
-
- heroku config:set MONGODB_URL=...
67
-
- git push heroku master
68
-
69
76
## Verification
77
+
First of all, ensure you have started local DynamoDB and created tables.
70
78
71
79
### Tests
72
80
@@ -90,7 +98,7 @@ npm run e2e
90
98
npm run mock-api
91
99
```
92
100
93
-
-Ensure you have start MongoDB and properly configure `MONGODB_URL`. Run the following commands to clear and insert test data, step up environment variables and start the app.
101
+
- Run the following commands clear and insert test data, step up environment variables and start the app.
0 commit comments