1
votes

I am creating a NodeJS application on server. And on client side, I am creating BackboneJS. For web-applications, it is preferred to use DB connections, server side code and client side html files in single package.

Since we are creating app in NodeJS, what is the best possible to secure our server side JS files from being getting downloaded on browser, when web-page is loaded. While using CommonJS, with client side JS files so as to access, DB files, then all the files will get downloaded, and the end-user will understand all the server side code on his browser.

1

1 Answers

1
votes

The server side/middleware code is not visible to your browser. The only folder which should be visible is the public folder which contains your client side scripts, css and images.