arvindr21 / diskDB

A Lightweight Disk based JSON Database with a MongoDB like API for Node

Home Page:http://arvindr21.github.io/diskDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to save record with different path to data file

mpsbhat opened this issue · comments

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?

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.