Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minimize Node js application .js files?

We have developed a desktop application using node webkit and it works fine. My only doubt is that, do we need to perform minification on the .js files written as part of node js server component. We usually perform minification on the javascript written mainly for UI view to reduce payload during loading of related javascripts of the HTML and also to hide coding information in the scripts so that its hard to modify.

So do we need to perform similar kind of concatenation and minification process on the node js server side .js files and then share the node webkit executable to the Customer. Without minification of node js files, the application works perfectly fine.

So, going back to my question -- Do we need to perform javascripts concatenation and minification for node js application?

like image 228
user3220129 Avatar asked Aug 17 '15 19:08

user3220129


People also ask

Should you minify Nodejs?

Minifying code is usually done to conserve bandwidth. Since node. js runs on the server, I'd say it's meaningless to minify the code.

How can you improve the scalability of a node js app?

Scale across Multiple Machines with a Load Balancer Scaling your Node. js application horizontally across multiple machines is similar to scaling across multiple cores on a single machine. As long as your application can run as an independent process, it can be distributed to run across several machines.


1 Answers

Minification is generally to save bandwidth when downloading script files over the internet, so there isn't any real point to minifying your node.js files on your server if they aren't served anywhere.

I really doubt your server's storage needs to save a few kilobytes.

like image 132
David Zech Avatar answered Sep 19 '22 20:09

David Zech