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