I’ve been able to get a sample application working with atom-shell.
What I would like to do is create a very robust uploader (eg. will continue even after a system reboot) that synchronizes a user-selected folder of files with a backend service.
Ideally, I would like to separate the browser side where the source directory and destination location can be selected from the upload continuation logic (eg. read the file data for the files that have not yet been uploaded from the file system lazily when uploading starts).
1) Problem 1 - interaction paradigm with the browser/node
I found this article which implies that IPC should be used to communicate between the node entry application and the browser window: Inconsistency between node and atom-shell behavior
I am trying to keep the browser code separate from the node filesystem integration, what is the best way to decouple these aspects in atom-shell? Is RESTful HTTP using express possible/recommended or should IPC or something else be used? Or are most atom-shell applications built as a hybrid browser/node approach without this separation rather than MVC?
2) Problem 2 - constraints and integration paradigm with the file system
I’ve been Googling to try to understand the paradigm for how to interact between the browser and file system code.
I found this article which implies there is some level of sandboxing and maybe that files are read-only: https://github.com/atom/atom-shell/blob/master/docs/tutorial/application-packaging.md
I found this article that says there is a way to know exactly where the file is on the file system using the path variable (docs/api/file-object.md)
Is there some sort of sandboxing of applications with the atom-shell where there would be a discontinuity between what files can be selected in the browser process and the ones that can be accessed by the node process via the path variable? If so, I was thinking about copying the file data into a cache inside the sandbox from the browser using base64 or some equivalent format, but is the file system access using Node’s fs module read-only?
Thank you everyone for your help. I’d be happy to write this up for atom-shell for their docs.