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
Copy file name to clipboardExpand all lines: README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,9 +51,9 @@ Microservice to manage CRUD operations for all things Projects.
51
51
```bash
52
52
NODE_ENV=development npm run sync:db
53
53
```
54
-
This command will crate tables in `postgres` db.
54
+
This command will crate tables in `postgres` db.
55
55
56
-
*NOTE: this will drop tables if they already exist.*
56
+
*NOTE: this will drop tables if they already exist.*
57
57
58
58
* Sync ES indices
59
59
```bash
@@ -72,9 +72,11 @@ Microservice to manage CRUD operations for all things Projects.
72
72
73
73
### Import sample metadata
74
74
```bash
75
-
node migrations/seedMetadata.js
75
+
CONNECT_USER_TOKEN=<connect user token>node migrations/seedMetadata.js
76
76
```
77
-
To create sample metadata entries (duplicate what is currently in development environment).
77
+
This command will create sample metadata entries in the DB (duplicate what is currently in development environment).
78
+
79
+
To retrieve data from DEV env we need to provide a valid user token. You may login to http://connect.topcoder-dev.com and find the Bearer token in the request headers using browser dev tools.
Copy file name to clipboardExpand all lines: migrations/seedMetadata.js
+15-5Lines changed: 15 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -3,19 +3,31 @@ const _ = require('lodash')
3
3
constaxios=require('axios');
4
4
constPromise=require('bluebird');
5
5
6
+
if(!process.env.CONNECT_USER_TOKEN){
7
+
console.error('This script requires environment variable CONNECT_USER_TOKEN to be defined. Login to http://connect.topcoder-dev.com and get your user token from the requests headers.')
8
+
exit(1);
9
+
}
10
+
11
+
// we need to know any logged in Connect user token to retrieve data from DEV
0 commit comments