I've just started to work with Node-webkit, and think it's great.
I've setup a db using the "Web SQL Database" option, mentioned here, and it seems to work well. Much like Sqlite, which I'm a bit familiar with.
From the docs, this is implemented using sqlite, so I'd like to be able to find the actual db file this create on disk and look at it with a Sqlite editor, like sqliteman.
Where is the db file saved to?
I couldn't find it in the docs, or by googling it ;-)
Since node-webkit version 0.6.1, you may retrieve the dataPath from the App object. The WebSQL files will be stored within the databases
folder.
Wiki: https://github.com/rogerwang/node-webkit/wiki/App
Get the application's data path in user's directory.
Windows: %LOCALAPPDATA%/;
Linux: ~/.config/;
OSX: ~/Library/Application Support/ where is the field in the manifest.
Example:
require('nw.gui').App.dataPath;
I'm on a mac, and I used the tool Sloth to see the files that are opened by an application... Basically it's a GUI version of the command line lsof (list open files)
It pointed me to the following path:
~/Library/Application Support/YOUR_APP_NAME/databases/file__0/
and the sqlite db file was in there!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With