Skip to content

Tag: express

Get a value from a callback in another function NodeJS

I’m desperately trying to recover the value of a callback function but I have no idea how to do that. I have a function where I execute this code: Who performs this function: And which is called by this variable: I would like my `authentication’ variable to take the value returned in the callback,…

How to wait for new information from a node.js server

so i am making a small chat lobby project. But im having issues with getting the messages people are sending to the server, back to the clients to show them on the site. It kind of worked using a loop like this: However this is obviosly really bad, and if you started spamming, or too many clients joined, it o…