Answer the question
In order to leave comments, you need to log in
How to leave blog posts/topic comments without reloading the page using node.js/express?
Hello! I just want to know which way to look, and what technologies to use. So, a blog on Node.js/Express, a user creates a topic, other users can leave comments and posts to this topic. What is the solution in node.js that will fast posts in real time without reloading the page? I’m still a beginner and I haven’t quite figured out the same web sockets, is there a reason to look there or is it still more for chat and real-time communication than for blog-like services? Thank you all for your attention and replies!
Answer the question
In order to leave comments, you need to log in
If you need to update your comments - sockets are not needed. An http request is sent to add a comment, a response is expected, with status 200 we add a new entry on the page. This all happens in the browser, node.js has nothing to do with it. If you need to update other people's comments in real time, then sockets are indispensable. I advise you to start with socket.io , there is everything you need for a quick start.
In its basic form, these are, of course, web sockets, but you will have to implement the logic yourself. Have a look at sharedb ( https://github.com/share/sharedb) it's a much more advanced thing for syncing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question