Closed theaj closed 6 years ago
Isn't pm2/nodemon sufficient for this?
@TheAJ There is an important overhead due to the fact that a new Chrome instance has to be launched each time. Therefore using the command-line ReLaXed to build PDFs on a server is not recommended.
While there may be a way to "serve" PDFs with ReLaXed in the future, right now most of the code focuses on user experience when using ReLaXed interactively, instead of on a server, mostly because the "server" case is already covered by other tools.
Could you share what your usecase is, and could it be solved by using directly pupetteer or for instance Pdf-Bot ?
@Zulko Thanks for the quick reply. Possible pdf-bot could work.
I have about 5.5 million HTML pages, which are pre-rendered and want to convert them to PDF as fast as possible. The HTML is still re-usable, so something that works with chrome was necessary.
In that case ReLaXed is not the right tool, pdf-bot or a simple webserver using puppeteer would do (in the puppeteer README they show you how to make a PDF in 10 lines of JS).
Closing this for now.
Is it possible to daemonize RelaxedJS to continuously pass in files and spit out files? I feel like there is overhead is spawning a new nodejs process for each file that we have. Keep in mind I want to run this inside a docker image, orchestrated by Kubernetes.
Thank you.