Question: Integrating a Postgres Database with Express API project: Create two database tables, Express API project will need to be modified to connect to the Postgres
Integrating a Postgres Database with Express API project:
Create two database tables,
Express API project will need to be modified to connect to the Postgres Database using pg
React app logLog In Endpoint will accept credentials from React app, read the credentials from the database, and compare.
Return and return the primary key of the user account if comparison check passes.
Return if no user account exists.
Return if comparison check fails.
Registration Endpoint will accept data from React app, insert new record into the useraccounts table
Return and return the primary key of the newly created user account.
Return if that username already has a user account.
Account Endpoint POST will accept data from React app, including the primary key of the user making this update, insert new record into the useraccountdetails table
Return and return the newly created data entry.
Account Endpoint GET will accept user primary key, read useraccountdetails from the database
Return and return all the data from the useraccountdetails record for that user
Return if there is no data in the useraccountdetails for that user
Account Endpoint PUT will accept user primary key, read useraccountdetails from the database, update existing record of the useraccountdetails table
Return and return all the data from the useraccountdetails record for that user
Return if no existing record is found for that user primary keyic will need to be updated to know which endpoint to hit as well as handle any errors from Express
Must be mobile responseness
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
