gun icon indicating copy to clipboard operation
gun copied to clipboard

new Gun({ file: './data.json' }); creates a folder instead of single JSON file

Open Joncom opened this issue 4 years ago • 2 comments

Screen Shot 2020-06-24 at 4 14 28 PM

This would appear to contradict the official documentation.

Joncom avatar Jun 24 '20 23:06 Joncom

may be it's the dot at the start of the string?

davay42 avatar Sep 05 '20 20:09 davay42

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.

Choko256 avatar Oct 16 '21 11:10 Choko256