Can't get the blog post

#1

I have created a blog site in node red. I have used mongodb database to create a collection and store my content. Everything is working fine, there is no error in debug side bar. But I cannot able to display my blog page
Can anyone help me with it ?

0 Likes

#2

Not without a lot more information...

What hardware? versions of node-red? nodejs? npm? dashboard (if you are using it)?
Any errors in the node-red console log? how about the browser's dev console?
Can you post your flow, or at least screenshots/descriptions of how it's supposed to work?

0 Likes

#3

This is my flow.

[{"id":"f28d0390.5bc93","type":"http in","z":"253ca5cd.01692a","name":"","url":"/public/posts","method":"get","upload":false,"swaggerDoc":"","x":119,"y":120,"wires":[["d88fb3de.79194"]]},{"id":"d88fb3de.79194","type":"mongodb in","z":"253ca5cd.01692a","service":"ext","mongodb":"8d624ed0.6f48a","name":"find posts","collection":"posts","operation":"find","x":337,"y":167,"wires":[["22b0827f.07d09e"]]},{"id":"22b0827f.07d09e","type":"template","z":"253ca5cd.01692a","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"mustache","template":"\n\n \n \n \n

My Micro Blog

\n \n Title\n \n Post Content\n <input type=”text” class=”form-control” name=”post” placeholder=”Say something…” />\n <button type=”submit” class=”btn btn-default”>Submit\n \n
\n {{#payload}}\n
\n

{{title}}

\n

{{post}}

\n
\n {{/payload}}\n
\n \n","output":"str","x":613,"y":83,"wires":[["4b77b2ec.039cac"]]},{"id":"4b77b2ec.039cac","type":"http response","z":"253ca5cd.01692a","name":"","statusCode":"","headers":{},"x":849.5,"y":170,"wires":[]},{"id":"b9231c6c.862ad","type":"mongodb out","z":"253ca5cd.01692a","service":"ext","mongodb":"8d624ed0.6f48a","name":"","collection":"posts","payonly":false,"upsert":false,"multi":false,"operation":"store","x":518,"y":511,"wires":[]},{"id":"235e3839.28a718","type":"http response","z":"253ca5cd.01692a","name":"","statusCode":"","headers":{},"x":630.5,"y":330,"wires":[]},{"id":"8f59cedd.1dcff","type":"function","z":"253ca5cd.01692a","name":"","func":"msg.headers={\n "Location":"https://rahulmathavan.fred.sensetecnic.com/api/public/posts"\n};\nmsg.statusCode=302;\nreturn msg;","outputs":1,"noerr":0,"x":434,"y":300,"wires":[["235e3839.28a718"]]},{"id":"36505ef7.7af812","type":"http in","z":"253ca5cd.01692a","name":"","url":"/public/posts","method":"post","upload":false,"swaggerDoc":"","x":211,"y":335,"wires":[["8f59cedd.1dcff","b9231c6c.862ad"]]},{"id":"8d624ed0.6f48a","type":"mongodb","z":"","hostname":"ds159204.mlab.com","port":"59204","db":"rahul","name":""}]
0 Likes

#4


this is my flow.

0 Likes

#5

Hmmm is this class work? this is the exact same code as posted in Blog site using Mongo db

0 Likes

Blog site using Mongo db
#6

no we are just learning node programming together!

0 Likes

#7

So if you want help, answer a;; the questions people asked. Go back and reread this thread and answer ALL the questions AND edit your flow after reading How to share code or flow json

and if you are learning together then only one of yoou should be posting questions. If you both post the same question you will not get responses faster, in fact the opposite may happen.

0 Likes

#8

okay thanks

0 Likes