I have an offline web app for PC with JavaScript and I am looking to add a database to it. The problem is that it requires persistent data storage across multiple computers (via USB). So I want to find a way to store this data on a USB instead of on the computer's hard drive.
I have looked into solutions such as lokijs and while lokijs does have persistent storage, it is stored inside Local Storage or IndexedDB. This means that it is stored on the computer through the browser. A way to solve this is to somehow read/write files with JavaScript or to save the database file in the same directory as the other files (for portability through USB). Is there a way to do this? To my knowledge, there isn't a way to achieve this.
Another solution would be to download a portable version of Chrome and create a .bat file to ensure that the web app will open using the portable Chrome. I think (not too sure) that the portable Chrome will keep the Local Storage/IndexedDB data in between sessions. However, this method is bulky and I would rather not rely on this.
So, is there an alternative to solve this problem? Or is there another JavaScript database out there that can locally store and retrieve a database to achieve persistent data storage across multiple computers via USB.
Thanks for reading and I'd appreciate any answers.
Basically, you want a portable, fat-client application built with web technologies. There are multiple solutions for this. I'd recommend using NodeWebKit or something similar (JavaFX also has web rendering capabilities with JavaScript).