Implementation reviews express.js?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
8 views
As a user leaves comments on the site? Want to know the algorithm. After entering text in the box and pressing for example the button "comment" is triggered the handler and sends the data to the server, and that, in turn, processes them and outputs with the relevant location? Do I need to connect to this database if you want that after refreshing the page the comments.
by | 8 views

1 Answer

0 like 0 dislike
All right:
1. a user writes a comment and clicks submit.
2. initiate a request to the server.
3. the server performs validation of the received data, if it passed writing a comment into the database and sends a response with status 200 and review with the assigned ID or just ID. If not returns an error.
4. the interface renders the received comment in the thread or an error message.
Use DB for this task.
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked Apr 28, 2019 by xymox72
0 like 0 dislike
1 answer
asked Apr 20, 2019 by webninja_surgut
110,608 questions
257,186 answers
0 comments
35,536 users