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
- S3_ENDPOINT: endpoint of AWS S3 API, for unit and e2e test only; default to `localhost:9000`
70
-
71
-
## AWS S3 Setup
72
-
Go to https://console.aws.amazon.com/ and login. Choose S3 from Service folder and click `Create bucket`. Following the instruction to create S3 bucket.
73
-
74
-
## Local services setup
75
-
In the `local` folder, run `docker-compose up`
76
-
It starts Elasticsearch, DynamoDB and S3 compatible server.
71
+
You can find sample `.env` files inside the `/docs` directory.
77
72
78
-
## Mock api
79
-
For postman verification, please use the mock api under mock-api folder. It provides mock endpoint to fetch challenge resources and groups.
80
-
You need to ensure DynamoDB configuration in `mock-api/config/default.js` is consistent with `config/default.js`
81
-
Go to `mock-api` folder and run commands `npm i` and `npm start` to start the mock-api listening on port 4000
82
-
83
-
## Create Tables
84
-
1. Make sure DynamoDB are running as per instructions above.
85
-
2. Make sure you have configured all config parameters. Refer [Configuration](#configuration)
86
-
3. Run `npm run create-tables` to create tables.
87
-
88
-
## Scripts
73
+
## Available commands
89
74
1. Drop/delete tables: `npm run drop-tables`
90
75
2. Creating tables: `npm run create-tables`
91
76
3. Seed/Insert data to tables: `npm run seed-tables`
@@ -99,6 +84,22 @@ Go to `mock-api` folder and run commands `npm i` and `npm start` to start the mo
99
84
100
85
## Local Deployment
101
86
87
+
### AWS S3 Setup
88
+
Go to https://console.aws.amazon.com/ and login. Choose S3 from Service folder and click `Create bucket`. Following the instruction to create S3 bucket.
89
+
90
+
### Local services setup
91
+
In the `local` folder, run `docker-compose up` to start Elasticsearch, DynamoDB and S3 compatible server.
92
+
93
+
### Create Tables
94
+
1. Make sure DynamoDB are running as per instructions above.
95
+
2. Make sure you have configured all config parameters. Refer [Configuration](#configuration)
96
+
3. Run `npm run create-tables` to create tables.
97
+
98
+
### Mock API
99
+
The provided mock API provides mock endpoint to fetch challenge resources and groups so you don't have to deploy the related services locally.
100
+
You need to ensure DynamoDB configuration in `mock-api/config/default.js` is consistent with `config/default.js`
101
+
Go to `mock-api` folder and run commands `npm i` and `npm start` to start the mock-api listening on port 4000
102
+
102
103
- Install dependencies `npm install`
103
104
- Run lint `npm run lint`
104
105
- Run lint fix `npm run lint:fix`
@@ -110,8 +111,27 @@ Go to `mock-api` folder and run commands `npm i` and `npm start` to start the mo
110
111
- App is running at `http://localhost:3000`
111
112
- Start mock-api, go to `mock-api` folder, run `npm i` and `npm start`, mock api is running at `http://localhost:4000`
112
113
114
+
## Production deployment
115
+
116
+
- TBD
117
+
113
118
## Running tests
114
119
120
+
### Configuration
121
+
122
+
Test configuration is at `config/test.js`. You don't need to change them.
123
+
The following test parameters can be set in config file or in env variables:
0 commit comments