Can`t aceess show page json
Closed this issue · 14 comments
Does your program ever console.log the value of contact
Yes when I run my controller, it does. I can see the result in the terminal(not the browser).
since you have {name: req.params.name}
as your 1st argument to .findOne()
:
Change
app.get('/backend/:catagory', catagoryController.show)`
to
app.get('/backend/:name', catagoryController.show)
I did it, but still no change.
What's the value of contact
when it is logged?
If I run the controller and put this code:
catagoriesController.show({catagoryName: "aaa"})
Then the log show me detail about aaa
You have data in your mongo db, right?
Yes I have data I can see index page clearly.
Ah that's what I thought, badcfg
refers to when an object is received instead of an array (single thing instead of a list of things). Instead of .query()
, use .get()
.
ops now even I can`t see index page
I don't have a sense of where you are with your issue, can you include relevant code and errors?
now solved, thanks.
yay!