STEPS:
- Create backend api with nodejs + express
- Create frontend with react
Running the code:
- The backend api is running on port 3000
- The frontend is running on port 3006
Requirements Our users want a simple application that allows them to:
-
View a select box of users
-
Select a user and,
-
see posts from that user and,
-
add additional posts
The user list will be loaded when the application initializes.
Clicking Get posts will query the posts from that user and show them in an unordered list. If no comments are found, then the list will be empty. The user will be able to add a new comment by entering text in a text field and clicking Add post. That post will be written to the backend and its title added to the list of posts displayed for the selected user.