Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started