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