gun
gun copied to clipboard
new Gun({ file: './data.json' }); creates a folder instead of single JSON file
This would appear to contradict the official documentation.
may be it's the dot at the start of the string?
With Radisk enabled, the file
parameter is the name of the folder (relative to the process.cwd()
) where the data will be stored. I don't know why the docs are saying you can create a single file.
By the way, you can't specify an absolute path because the Gun stats module is creating a file named stats.<file>
in the current working directory.