Thursday 17 May 2018

Question about nodeJS and concurential acess.

Hello. I've developped a messenger bot from scratch to advise buyers of a company. I've made a file storage system with FS so when I have to store sthing like the product they want, I write it in a file in the server.Here comes my question :If I call a function, which open the file "client123" and write into this file "{Product_type : x, product_number : y...}"If I want to iterate on the object to create a new object(like a string with all the attributes values)Can I do : for(let keys in client123") Or will I have to do (for keys123.comptor in client123")I mean I don't get if my variable which have been declared in a promise.then() are independant?thanks

Submitted May 17, 2018 at 02:23PM by aloisnoob39

No comments:

Post a Comment