0
I am working on a small system and I am using web for N reasons, easy to customize, work with full screen (F11), everything is flowing fine. I arrived in a part that I need to list the number of files that are inside a certain directory and I saw that it is impossible to do with Javascript but that I can use Node.js.. However, I find it so bad to have to install Node.js only to run 4 lines of code, will break my idea until you leave the system super light.
Is there any way around this? Some way to get the amount of files that are inside a directory?
Thank you.
(Just confirming, if I develop using Node.js the client will also need to have it installed, correct?)
If the distribution for your client is offline, yes, otherwise it is possible to host on a server easily, and your client will not need the Node. Regarding the performance, I think it would not go down too much with Node, I think it’s a good idea because it was initially designed for handling files on the server, and it does this very quickly and yes, this type of counting is only possible with a server language.
– Felipe Duarte
You can migrate your web application to the framework Electron as an app that has greater access to the machine and work without having to install Node.js on the client’s machine to use the app, here’s an example: Electron-file-explorer
– Rômulo Gabriel Rodrigues
I forgot to mention, yes the application needs to work offline. It is, but imagine, have to install 15mb just to run 4 lines, because the only thing that is missing is even automate this take the amount of files to know the number of pages that it will run. : / .
– Alexandre Bonadiman Angeli
I don’t know this Lectron, I don’t quite understand how it works but I’ll read about it.
– Alexandre Bonadiman Angeli
Electron is basically a browser with built-in Node. It is made to create desktop applications using web technology (html, css, js + Node). Sounds exactly like your case.
– bfavaretto
Look, cool face.. I’ll see it now! Thanks so much for the help, I believe it will solve my problem.
– Alexandre Bonadiman Angeli