Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step 10: instructions unclear #43

Open
PRANAY100 opened this issue Mar 14, 2019 · 1 comment
Open

Step 10: instructions unclear #43

PRANAY100 opened this issue Mar 14, 2019 · 1 comment

Comments

@PRANAY100
Copy link

PRANAY100 commented Mar 14, 2019

The instructions asked to use res.sendFile. As the script.js is trying to GET request, its first confusing to use GET request in server.js as well, and to respond with the same blogpost again when POSTing it.

@minaorangina
Copy link
Member

The responses serve different purposes: when script.js calls GET /get-posts, it is to return all historical blogposts, whereas POST /create-post just returns the latest one after it's created, so you can display it straight away. Does this clarify things?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants