44
55- nodejs https://nodejs.org/en/ (v12+)
66- Postgres
7+ - ElasticSearch (7.x)
78
89## Configuration
910
@@ -15,27 +16,48 @@ The following parameters can be set in config files or in env variables:
1516- ` BASE_PATH ` : the server api base path
1617- ` AUTH_SECRET ` : The authorization secret used during token verification.
1718- ` VALID_ISSUERS ` : The valid issuer of tokens, a json array contains valid issuer.
19+ - ` AUTH0_URL ` : Auth0 URL, used to get TC M2M token
20+ - ` AUTH0_AUDIENCE ` : Auth0 audience, used to get TC M2M token
21+ - ` TOKEN_CACHE_TIME ` : Auth0 token cache time, used to get TC M2M token
22+ - ` AUTH0_CLIENT_ID ` : Auth0 client id, used to get TC M2M token
23+ - ` AUTH0_CLIENT_SECRET ` : Auth0 client secret, used to get TC M2M token
24+ - ` AUTH0_PROXY_SERVER_URL ` : Proxy Auth0 URL, used to get TC M2M token
1825- ` POSTGRES_URL ` : Postgres database url.
1926- ` DB_SCHEMA_NAME ` : string - postgres database target schema
2027- ` PROJECT_API_URL ` : the project service url
28+ - ` TC_API ` : the topcoder v5 url
29+ - ` ORG_ID ` : the organization id
30+ - ` HOST ` : the elasticsearch host
31+ - ` ES_INDEX_JOB ` : the job index
32+ - ` ES_INDEX_JOB_CANDIDATE ` : the job candidate index
33+ - ` ES_INDEX_RESOURCE_BOOKING ` : the resource booking index
2134
2235
2336## Postgres Database Setup
2437Go to https://www.postgresql.org/ download and install the Postgres.
2538Modify ` POSTGRES_URL ` under ` config/default.js ` to meet your environment.
2639Run ` npm run init-db ` to create table
2740
41+ ## ElasticSearch Setup
42+ Go to https://www.elastic.co/downloads/ download and install the elasticsearch.
43+ Modify ` esConfig ` under ` config/default.js ` to meet your environment.
44+ Run ` npm run create-index ` to create ES index.
45+ Run ` npm run delete-index ` to delete ES index.
46+
2847## Local Deployment
2948
3049- Install dependencies ` npm install `
3150- Run lint ` npm run lint `
3251- Run lint fix ` npm run lint:fix `
3352- Clear and init db ` npm run init-db `
53+ - Clear and create es index ` npm run delete-index, npm run create-index `
3454- Start app ` npm start `
3555- App is running at ` http://localhost:3000 `
3656
3757## Testing
38- - Run mock-project-service app
58+ - Run tools/mock-project-service app
59+ - Run ` npm run init-db `
60+ - Run ` npm run create-index `
3961- Run ` npm run test ` to execute unit tests
4062- Run ` npm run cov ` to execute unit tests and generate coverage report.
4163
0 commit comments