Skip to content

Feature/data scripts - improvements #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,11 @@
npm run local:init
```

This command will do 2 things:
This command will do 3 things:

- create Database table
- create Elasticsearch indexes
- create Database tables (drop if exists)
- create Elasticsearch indexes (drop if exists)
- import demo data to Database and index it to ElasticSearch (clears any existent data if exist)

5. 🚀 Start Topcoder TaaS API

Expand Down Expand Up @@ -153,7 +154,8 @@
| `npm run services:up` | Start services via docker-compose for local development. |
| `npm run services:down` | Stop services via docker-compose for local development. |
| `npm run services:logs -- -f <service_name>` | View logs of some service inside docker-compose. |
| `npm run local:init` | Creates Elasticsearch indexes and initializes Database. |
| `npm run local:init` | Recreate Database and Elasticsearch indexes and populate demo data for local development (removes any existent data). |
| `npm run local:reset` | Recreate Database and Elasticsearch indexes (removes any existent data). |
| `npm run cov` | Code Coverage Report. |
| `npm run migrate` | Run any migration files which haven't run yet. |
| `npm run migrate:undo` | Revert most recent migration. |
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"services:up": "docker-compose -f ./local/docker-compose.yml up -d",
"services:down": "docker-compose -f ./local/docker-compose.yml down",
"services:logs": "docker-compose -f ./local/docker-compose.yml logs",
"local:init": "npm run create-index && npm run init-db",
"local:init": "npm run local:reset && npm run data:import -- --force",
"local:reset": "npm run delete-index -- --force && npm run create-index -- --force && npm run init-db force",
"cov": "nyc --reporter=html --reporter=text mocha test/unit/*.test.js --timeout 30000 --exit"
},
"keywords": [],
Expand Down