I am writing a dictionary app with Cordova. The data size is about 20MB.
I want the app to work completely offline, and query data locally. And I find PouchDB really suitable for that.
However, I also want to have all the data pre-installed with the app (in JSON format). That is, to put all the data in the app package (in www/data folder of the Cordova project).
From what I've known so far, PouchDB can create data or sync data from a server, but I want to know how it can utilize data files inside the www folder of the app.
And, how should I format the data file so that PouchDB can query from it directly, without having to first read from the file and then insert data into PouchDB.
Does anyone have any ideas? Or perhaps any other JS libraries that can accomplish this?
Thanks!
https://pouchdb.com/2016/04/28/prebuilt-databases-with-pouchdb.html covers step by step instructions of how to include pre-built data in your application. You can use either sqlite database files or raw texts files.