Created on 1st April 2023
•
Initially the problem was "where to compile the code?".
Each approach had it's ups and downs.
For example if i decided to go with first option, I required a place to compile code or store it. Then again i would also need a good server (maybe saas might work), but in the end it would lead to more cost if number of user increases which i clearly cannot afford. This approach might not also be quick since we keep sending requests to backend debouncing the code editor.
Hence, in order to save money and make the process of compilation quick i decided to go with option 2. User can get his/her code compiled really quick and npm packages can be cached locally. Next time user imports the same package it won't be downloaded again saving time and bandwidth.