- PostgreSQL 16
- PgAdmin for PostgreSQL GUI
- Node : v16.20.2
- npm : 8.19.4
- Assuming that postgreSQL 16 and PgAdmin is installed on you PC, open the pgAdmin GUI
- In pgAdmin server, create a Database with name:
tranquilityDatabase
- Right click on the tranquilityDatabase DB in PgAdmin, and choose queryTool
- In queryTool paste the SQL query present in file:
tablesMigration.sql
and click on Execute/Refresh option. - tranquilityDatabase is now created and setup with the required tables
- Double check with database properties mentioned below and make necessary changes accordingly in
tranquility-backend-v1/index.js
host: 'localhost', database: 'tranquilityDatabase', user: 'tranquilityAdmin', password: 'tranquilityAdmin', port: 5433 - You are good to start the application now.(Check below steps)
- Insert/create few user before you proceed with any other tasks. Refer Postman collection
Create User
and create users with different email addresses.
- Install dependencies : npm i (Skip this step if already installed)
- npm start
Application by default starts on port: 3000
-
GET /users This route fetches all the existing users
-
POST /users This route used to create a user
Note: field email is UNIQUE and hence duplicates are not allowed. Use different email value for every new request
Refer: Postman Collection's
Create User /users
-
POST /questionnaire This route is used to set the questionnaire for exisiting users
Refer: Postman Collection's
Questionnaire /questionnaire
-
POST /userinteractionfeedback This route is used to set the user interaction feedback for the media files
Refer: Postman Collection's
Media Feedback /userinteractionfeedback