The repository source code is no longer maintained, because it was moved to https://github.com/artipie/npm-adapter
This is the dependency you need:
<dependency>
<groupId>com.artipie</groupId>
<artifactId>npm-proxy-adapter</artifactId>
<version>[...]</version>
</dependency>
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.
Detailed explanation about used algorithms and protocols can be found here: implementation.md
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+.