Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

85
Views
Nodejs combine request 2 sessions

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();
       
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

There is an Global variable in your code that works same thing for all users , you need to remove that global variable .

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!