You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So we've cheated a little bit by using babel-node. While this is great for getting something going. It's not a good idea to use it in production.
We should be precompiling your files, so let's do that now.
I'm curious, why exactly is it not a good idea? Isn't the code getting executed the same? And as servers are generally longer-running then clients, the code doesn't get recompiled so often but only when the app crashes or gets redeployed. I see the advantages of pre-compiling on the client side, but I'm not sure why it's necessary on the server side. Could someone elaborate?
The text was updated successfully, but these errors were encountered:
You should not be using babel-node in production. It is unnecessarily heavy, with high memory usage due to the cache being stored in memory. You will also always experience a startup performance penalty as the entire app needs to be compiled on the fly.
Our medium sized Express app takes about 20% more memory (120MB vs 100MB) and startup time is not that important if the process is long-running. The docs only list these two reasons, does that mean if we're aware of these downsides it is safe to use in production?
Hello,
It says the following in
README.md
:I'm curious, why exactly is it not a good idea? Isn't the code getting executed the same? And as servers are generally longer-running then clients, the code doesn't get recompiled so often but only when the app crashes or gets redeployed. I see the advantages of pre-compiling on the client side, but I'm not sure why it's necessary on the server side. Could someone elaborate?
The text was updated successfully, but these errors were encountered: