You can find more about the repo option here in the js-ipfs docs.
As for where it’s saved, for me, it’s in the same directory I’m running my commands from. I don’t know how your configuration works, or where that data goes. For me they’re saved in a directory, with the same name as the repo, assuming I used a custom one. As for not using a custom one, looks like the default location is usually ~/.jsipfs.
Hope that helps!
A great example of how js-ipfs works can actually be found on their homepage, I highly encourage you to check it out: https://js.ipfs.io/
Effectively, you can run a full IPFS node in browser using js-ipfs. I’m going to be working on an example of using js-ipfs to add data in an application context in the near future.
So understanding it’s a full node, you simply need to have the user add the file to their browser js-ipfs node, and from there if you want, you could have the user broadcast the resulting CID of the file to your nodes, and have them pin the CID for some time, which would help re-share the file if the user exits your app.
Typically if you’re not re-initialising IPFS multiple times in the same run, you’ll re-use the same repo. This means when the user returns to your website, the same IPFS repo will load, and they’ll begin re-sharing the file they added once again.
I occasionally find that, there is many indexed db.
For yesterday, await IPFS.create({repo: 'ok'+ Math.random()}) is good solution.
For today, I must find a better one.
Before, in my imagination, the size of one IPFS node, will be hundreds of M or G.
The example will be B/S architecture? Using create-react-app to build?
IPFS nodes can vary in size, generally a browser node won’t be very big, unless the user is intentionally adding lots of data to their node. The example will be a P2P example, IPFS uses libp2p in the background, so most applications are focused on a p2p scenario, without really a main server. User adds data, other users can retrieve it. It’ll be detailed, and you could of course modify it further or just learn from it if you wanted it to do more.
I plan to have it feeling stable. So I want it to feel like you have the benefits of a server handling everything, without actually having to rely on centralisation.