Thursday 26 December 2019

What is best database organization?

I want to be able to do something like:var success = await registerUser(user)var exists = await userExists(user)...What is best organization to do it? Where to save my function and my database connection?Right now I have one file called database.js with the MySQL connection and other file called controller.js with the functions that uses the database pool. Is important to have them asynchronous and independent.Any suggestions or examples?

Submitted December 26, 2019 at 11:27PM by patilanz

No comments:

Post a Comment