Sunday 13 March 2016

What are some good practices/bad practices in the layer between the server and the database in a node application?

In a node script, you call http.createServer(). Anything you put outside of this function provides you with an additional scope that you don't get in PHP (I'm a PHP guy).Is this useful in node? Could I preload the entire database outside of the http.createServer method and then stop reading from the database (is it even worth it to do this)? Are there benefits to having this extra scope?Any thoughts welcome!

Submitted March 13, 2016 at 05:43PM by 98_Vikes

No comments:

Post a Comment