Description:
I have one table in db say Table1
. having only one column AppNo(numeric)
and only single row, and current value is 0
I have created API in node.js
using Sequelize
ORM named UpdateAppNo
.
Whenever UpdateAppNo
api called value of AppNo
should increment by 1
.
What i want:
If 2 or more simultaneous request comes at a time, current request should wait until previous request to complete.
What happening now:
If previous request is in process, then current request throws an error.