'modification of 2 values at the same time by 2 Node servers in Mongoose

const data = await Order.find({});

// "response"
// data = {
title: "exemple",
countLeft: 10
};

how can I modify "countLeft" from 2 Node servers at the same time, but the value should be modified by each server separately if the request is fixed in the same second on both servers? In mongoose



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source