Node Cookbook(Third Edition)
上QQ阅读APP看书,第一时间看更新

Module caching

Sinopia also acts as a localized cache. If our registry endpoint is set to the Sinopia server we simply npm install a package and it will be downloaded from the npm registry then saved to sinopias storage. The next time we install the same module (and version), it will come from Sinopia.

If we're only interested in localized caching of npm modules, an interesting alternative to Sinopia is registry-static.

The registry-static tool is much simpler; it simply replicates the entire npm registry (around 300 GB of data) to a flat file structure.