where is the node-webkit database file path?

15 views
Skip to first unread message

yangj...@gmail.com

unread,
Aug 30, 2013, 11:08:01 PM8/30/13
to node-...@googlegroups.com
I have a windows desktop by node-webkit

i want distribute with databse file,

what kind database support this?
embeded in the program to distribute  without install 

many thanks 


Anthony Ettinger

unread,
Aug 30, 2013, 11:11:54 PM8/30/13
to node-...@googlegroups.com
I haven't actually done it yet, but I think you can use $HOME (linux/mac) or $HOMEPROFILE (win) and store your database file in something like $HOME/.yourapp/youdb.db relative to the user's home directory.

I'm looking into NeDB as its an SQLite sort of database, but with a Mongo interface instead of SQL.


var Datastore = require('nedb')
  , db = new Datastore({ filename: $HOME .'path/to/datafile', autoload: true });





--
You received this message because you are subscribed to the Google Groups "node-webkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-webkit...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Anthony Ettinger
http://about.me/anthony.ettinger
ant...@ettinger.name
+1 (831) 406-1123
Message has been deleted

yangj...@gmail.com

unread,
Aug 31, 2013, 12:05:45 AM8/31/13
to node-...@googlegroups.com
many thanks 

a great job


在 2013年8月31日星期六UTC+8上午11时11分54秒,Anthony Ettinger写道:

Anthony Ettinger

unread,
Aug 31, 2013, 4:20:14 PM8/31/13
to node-...@googlegroups.com
You have to do 'npm install nedb' first. Then you can package up your node_modules directory with your nw app.

if you use --save it'll write it to package.json for you.


On Fri, Aug 30, 2013 at 8:54 PM, <yangj...@gmail.com> wrote:
I just try nedb with node-webkit

it shows " Cannot find module 'nedb'   "

I want distribute my exe programe to windows  without install 

how to pack it with node-webkit

thank you very much





在 2013年8月31日星期六UTC+8上午11时11分54秒,Anthony Ettinger写道:
Reply all
Reply to author
Forward
0 new messages