git# RSVP Form - Full Stack
Build a simple full-stack RSVP form to allow users to respond to their invitation to _The Party.
( _The Party is private.)
Complete ALL Bare Minimums before moving forward to the Advanced Content.
- Create a form with React that:
- Takes in the following input:
- First Name
- Last Name
- Email Address
- Number of Guests
- Requires all input fields to have a value before a submission can be made.
- Performs input validation on the email address.
(Email must be of form
local@domain
.) - Upon submission, sends the RSVP data to your Express server.
- Takes in the following input:
- Create an endpoint called
/rsvps
in your Express server with a request handler that:- Invokes a database controller function that updates or creates a new document in your MongoDB collection,
rsvps
.
- Invokes a database controller function that updates or creates a new document in your MongoDB collection,
- Implement a database controller function that will update an existing rsvp record if a matching one exists or create one if it does not, in the file
/database/controllers/rsvp.js
.
- Add a RSVP list view that shows the names of the people attending
- Refactor your request handler so that it:
- Responds to the client with the modified document, rather than the original
- Responds with appropriate status codes for all situations. These include:
- Internal Server Error - Something went wrong.
- No record was found, so one was created.
- A record was found, so it was updated.
- Once the form is submitted and a response is returned, render an approriate confirmation view. Two are provided for you at the following paths:
/client/src/components/InsertConfirmation.jsx
/client/src/components/UpdateConfirmation.jsx