Question: Finally, use the twit template you implemented in step 1 to create a new route that displays a single twit. This route should behave as

Finally, use the twit template you implemented in step 1 to create a new route that displays a single twit. This route should behave as follows:

When a client requests a path of the form /twits/, where is an integer that is within the bounds of the array of twits stored in twitData.json (i.e. is between 0 and 7), you should respond with a page that contains only the corresponding twit. If is not within the bounds of the array of twits, or if it's not an integer, you should respond with a 404 status and the 404 page you implemented in step 3.

Your single-twit page should contain only the site header and the individual twit that was requested, the following things should not be displayed or even present in the DOM:

Any twits other than the one that was requested.

The "create twit" button.

The "create twit" modal and its backdrop.

For full credit, you should use the same template to render both your root path / and the /twits/ path. You can still earn partial credit by implementing separate templates for each of these paths.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!