Blog site using Mongo db

#1

This is my flow. I have created a blog site using mongo db. but i cannot able to retrieve my blog site. there are no errors in the debug sidebar.
please help me with it

[{"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

Can't get the blog post
#2

Please read: How to share code or flow json and edit your post

Is this class work? this is the exact same code that is posted in Can't get the blog post

1 Like