I have an app that store data of multiple users in stormdb for example
User A Login and send some requests and i will log it in his table And User B Login and send some requests and i will log it in his table
the issue in here when both send requests the database log user request one for all users
code example
var StormDB = require("stormdb");
// start db with "./db.stormdb" storage location
const engine = new StormDB.localFileEngine("./users.stormdb");
const db = new StormDB(engine);
var ddf = JSON.stringify(global.spider).replace("'",'"');
var index = db.get("users").state.users.findIndex((a)=>a.email == useremail);
var kk = db.get("users").get(index).get("spider").set(ddf);
db.save();
There is an Global variable in your code that works same thing for all users , you need to remove that global variable .