Closed mpsbhat closed 8 years ago
I am not sure I follow. Are you trying write somewhere on the file system? or with the nw app?
Aktually, I was trying to update a json file with nw app. It was solved by including the diskdb library file in the root of my project and calling it as var db = require('./diskdb');
so that i can access and update files which is anywhere in my system say for example in Video folders as ect('/home/user/Videos/myDB', [ 'articles'])
as mentioned in the question.
Okay. I wouldn't recommend that. If I the library updates, you will have a difficult time migrating to new version. Also, if you add any custom code, you will face issues while migrating.
Ok
If i will give some other path to data file than within nwjs application something as
db.connect('/home/user/Videos/myDB', [ 'articles'])
, then I can't able to save/update records to diskdb file in nw.js application once i built it. What is the workaround?