New answers tagged node.js
I'd follow the YAGNI approach for this (You Aint Gonna Need It). If you don't need a CDN right now, keep it all on your server. There's no need to carry extra expense and complication for something you don't even know you'll need for sure. Just be sure to code the site and set up the database with the notion that you may do a migration someday in the ...
Presuming your nginx server fronting node is proximate to said node server you get just about nothing out of using things like compression between the two. You've got plenty of bandwidth between the two, why waste CPU saving it? Moreover, if you are doing any rewrites in nginx it gets ugly as nginx has to unzip the contents, replace, and re-zip. If it lets ...
While this is probably a better question for ServerFault, I believe there is a clear answer: do compression on nginx. There are a couple of reasons for this: Compression is moderately CPU-intensive, and Node is single-threaded. Therefore, compression in node will potentially reduce the total number of requests a single server is able to handle. You will ...
Business logic doesn't belong in the view. The view should just iterate over your list of objects and output them and provide controls for facilitating change.
The likely problem is if you adopt IOjs your code (if you are using newer features) will only work there. It will not work on node (v10x)...unless you stick to es5.
The same way you always do when trying to make a program "platform independent": you try to use only features available on both platforms you provide different implementations for functions where this not possible, and switch between the implementation by detecting which platform you are using and the most important step: you test it on both platforms
Top 50 recent answers are included