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
{{ message }}
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,12 +62,12 @@ Setup your Elasticsearch instance and ensure that it is up and running.
62
62
63
63
1. Follow *Configuration* section to update config values, like database, etc ..
64
64
2. Goto *UBahn-api*, run `npm i` and `npm run lint`
65
-
3.Import mock data, `node scripts/db/genData.js`, this will gen some data for test (if you need this)
65
+
3.Run the migrations - `npm run migrations up`. This will create the database, the tables and insert mock data into the database. You will then run `npm run migrate-db-to-es` to migrate the data to elasticsearch from the database
66
66
4. Startup server `node app.js` or `npm run start`
67
67
68
-
## Working with mock data
68
+
## Migrations
69
69
70
-
You can use the scripts`npm run migrations up`(and `npm run migrations down`) to insert mock data (and delete mock data respectively). The data is inserted into Postgres and Elasticsearch. You need to setup the configurations beforehand and also start the elasticsearch instance before you run these scripts. You can run the script `npm run migrate-db-to-es` to dump data in db into es.
70
+
Migrations are located under the `./scripts/db/` folder. Run `npm run migrations up` and `npm run migrations down` to execute the migrations or remove the earlier ones
71
71
72
72
## Local Deployment with Docker
73
73
@@ -87,6 +87,4 @@ Make sure all config values are right, and you can run on local successfully, th
87
87
88
88
5. When you are running the application for the first time, It will take some time initially to download the image and install the dependencies
89
89
90
-
## Verification
91
-
92
-
See `Verification.md`
90
+
You can also head into `docker-pgsql-es` folder and run `docker-compose up -d` to have docker instances of pgsql and elasticsearch to use with the api
Copy file name to clipboardExpand all lines: docs/swagger.yaml
-147Lines changed: 0 additions & 147 deletions
Original file line number
Diff line number
Diff line change
@@ -71,159 +71,12 @@ paths:
71
71
description: "Enrich all child resources under the user"
72
72
required: false
73
73
type: "boolean"
74
-
- name: "skill[]"
75
-
in: "query"
76
-
type: "array"
77
-
description: "The skill name to filter users with. Specify multiple times to provide multiple values"
78
-
items:
79
-
type: "string"
80
-
collectionFormat: multi
81
-
- name: "achievement[]"
82
-
in: "query"
83
-
type: "array"
84
-
description: "The achievement name to filter users with. Specify multiple times to provide multiple values"
85
-
items:
86
-
type: "string"
87
-
collectionFormat: multi
88
-
- name: "location[]"
89
-
in: "query"
90
-
type: "array"
91
-
description: "The location name to filter users with. Specify multiple times to provide multiple values. `location` here is an attribute of the user"
92
-
items:
93
-
type: "string"
94
-
collectionFormat: multi
95
-
- name: "isAvailable"
96
-
in: "query"
97
-
type: "boolean"
98
-
description: "`true` corresponds to users that are available. `false` corresponds to users that are not available. `isAvailable` here is an attribute of the user"
0 commit comments