npm-proxy-adapter
Usage
This is the dependency you need:
<dependency>
<groupId>com.artipie</groupId>
<artifactId>npm-proxy-adapter</artifactId>
<version>[...]</version>
</dependency>
How it works?
After initial setup of the proxy repository, it can be used to work with NPM. NPM registry to install package from can be specified explicitly npm install --registry=https://artipie.com/npm-proxy-registry <package_name>
or setup as default with npm set registry https://artipie.com/npm-proxy-registry
command.
NPM sends HTTP requests to specified URL and adapter processes them. It proxies request to the remote repository previously setup. After getting artifact, it caches received data and transform before sending it back to client. The next request will not require remote repository call - the cached data will be used.
Technical details
Detailed explanation about used algorithms and protocols can be found here: implementation.md
How to contribute
Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master
branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:
$ mvn clean install -Pqulice
To avoid build errors use Maven 3.2+.