Sunday 13 March 2016

Is making db.query sync a right thing ?

So, I have a problem building an application that uses a database. After years of PHP, I'm building a site in NodeJS.When building a website that uses a database, I rapidly come over to some problems like what people call callback hell. There's async for that, but what if I simply want to make a one-line query ? Don't discuss performance with me. My PHP Scripts sometimes make over 600 queries in a row and it's still running fine.So, I made a thing to make it work in sync, on a gist. It works flawlessly, but is it right ? Isn't there a better version ?

Submitted March 13, 2016 at 03:47PM by KindlyFire

No comments:

Post a Comment