So I just tried Nest.js for about a week and I notice that the RAM usage to run it is quite high, about 2 GB.
While my pc can definitely run it, my ec2 instance with 1gb just freeze every time I tried to run it, building the project also cost me about 2 GB of RAM.
After searching for a bit, someone said it could be because I'm using Node v18, so I try installing the latest one (20.15.1) then delete the dist folder (someone mention about conflicting build) and then build and run, and it did actually reduced to about 100 MB.
The current problem is that my ec2 has already using the latest Node and the build process can't finish because it keeps running out of memory.
Is there anything I can try to solve this high RAM usage, or my only option is to upgrade?