krakenjs / kappa

A hierarchical npm-registry proxy
Other
557 stars 56 forks source link

Usable in read-only mode #110

Closed flesler closed 9 years ago

flesler commented 9 years ago

Hi,

This is just a suggestion. I went over the docs, opened and closed issues and haven't seen this mentioned. I'd love to be able to use it without requiring ever writing to disk. This would allow this to be run on something like Heroku, I think if that were possible, so many people would use it like that.

To achieve that, I guess you either rely on a different storage, or... publish package changes as commits on the hosting's version control and kappa pulls the packages from there.

It sounds a little clunky, but I wouldn't mind it personally, most private repos aren't hosting tenths of packages.

Thanks

jasisk commented 9 years ago

Hi @flesler,

you should be able to run kappa, itself, pretty much anywhere. You'd still need to host a couch instance somewhere that has the ability to write to disk but kappa, by itself, should be herokuable.

That said, I've never tried to but I bet you could hack registry-static to work like this. You could set up your own couchapp (sidenote: I've dockerized the couchapp if that's your thing), and point registry-static to it. That'll spit out the appropriate directory structure which you can then serve up somewhere without disk-write.

A little mad-science-y but I bet it could work.

flesler commented 9 years ago

Hi @jasisk

Thanks, will give this a try