ipfs-shipyard / npm-on-ipfs

:package: Install npm modules through IPFS!
MIT License
468 stars 40 forks source link

fix: dont spawn node for local ops #110

Closed fsdiogo closed 5 years ago

fsdiogo commented 5 years ago

Fixes https://github.com/ipfs-shipyard/npm-on-ipfs/issues/95.

fsdiogo commented 5 years ago

@achingbrain @olizilla can you guys take a look at this one?

My approach was to create a middleware that only runs in GET requests and starts a daemon, leaving other operations as is.

I wasn't sure about the update command, but it should be ok leaving it untouched, or am I wrong?

https://github.com/ipfs-shipyard/npm-on-ipfs/blob/78a563aa6cbb48752bddc1077778f370cb36e7b6/src/core/index.js#L6-L12