Skip to content

Tag: node.js

MongoDB Problems while inserting nested data

I try to build a database for a giveaway bot using MongoDB. Once a new giveaway is created the bot runs the following code to write the new giveaway into the databank: Giveaways should be a nested document in the document with the server’s information. My schemas for this looks like this: In my Mongo At…

How to convert PHP MD5 in NodeJS

I couldn’t find a concrete example for my problem I need to convert this line PHP in NodeJS : I have used several things without success, like CryptoJS.HmacMD5, CryptoJS.MD5 or md5 I feel it’s a bit more complex with NodeJS, the values ​​correspond to queries in the url that I retrieve with expres…

Node JS multliple promises chaining

I have node JS api server and I’m having issues with correct chaining of the Promises: What I get in console is : 1 [Object] – all good Emppty Array Empty Array get one doc {object} – all good 1.5 {object} – all good How would I make sure when I loop over result of 1st promise my code …