Make it so you can add comments to posts and view a list of comments.
Completion Criteria
Some guidelines for completing this task:
[ ] Create a new table for comments with the fields "id, comment, date, post_id". Update the server/config/generateDB file with the commands you used to create this table.
[ ] For each post, show a button labelled 'view comments'. Clicking this will fetch the comments and make them appear underneath the post.
[ ] Create a fetch-comments.js endpoint on the server side to return the comments.
[ ] At the bottom of this comment list show a button labelled 'Add comment'
Make it so you can add comments to posts and view a list of comments.
Completion Criteria
Some guidelines for completing this task:
server/config/generateDB
file with the commands you used to create this table.fetch-comments.js
endpoint on the server side to return the comments.add-comment.js
endpoint on the server side to add the comment.📖 Sample solution
View a sample solution here.