Closed mchavezi closed 9 years ago
Do you have anything in the database?
On Sat, Nov 15, 2014 at 10:44 PM, Michael Chavez notifications@github.com wrote:
I am following along with the book. After page 45 "MongoDB Models with Mongoose" http://localhost:3000/api/posts returns an empty array.
I also cloned the mean-sample ch4 repo got the same results.
Reply to this email directly or view it on GitHub: https://github.com/dickeyxxx/mean-sample/issues/5
Yup. I got it working by visiting the localhost:3000, that must have triggered it being in the db, because after that it worked.
Hmm strange, I don't know why that path would matter
On Sat, Nov 15, 2014 at 10:56 PM, Michael Chavez notifications@github.com wrote:
Yup. I got it working by visiting the localhost:3000, that must have triggered it being in the db, because after that it worked.
Reply to this email directly or view it on GitHub: https://github.com/dickeyxxx/mean-sample/issues/5#issuecomment-63207598
I am not sure how it started working actually, kinda like magic at this point.
but when I do curl -v -H "Content-Type: application/json" -XPOST --data "{\"username\":\"dickeyxxx\", \"body\":\"foo\"}" localhost:3000/api/posts, it does update the api, which is pretty cool;)
I am following along with the book. After page 45 "MongoDB Models with Mongoose" http://localhost:3000/api/posts returns an empty array.
I also cloned the mean-sample ch4 repo got the same results.