Closed olizilla closed 5 years ago
Fair point, we should probably spin a node up on-demand when the first registry request is received instead of at start-up.
Would it be better to whitelist some commands or to open an IPFS connection when the server gets the first request? Commands like login
will make a request to the server hence trigger connecting to the daemon although they don't need it. Or is there any other way to detect real registry connections?
Sure, I meant spin up a node when a request is received that would involve IPFS-related operations like transferring a file or resolving a packument, etc - there are a bunch of endpoints we create that are just forwarded on to npm (e.g. login, detecting vulnerabilities, etc) - they would stay as they are.
@achingbrain do you have a preffered solution here, or should we freestyle it? Can you drop any specific thoughts you have here so @fsdiogo can take a look.
of note this issue is very related https://github.com/ipfs-shipyard/npm-on-ipfs/issues/96
Things like
npm ls
andnpm -v
shouldn't trigger a spawn n dial.