npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nopar

v0.8.4

Published

Abstrakt Node Package Registry & Proxy

Downloads

162

Readme

NOPAR - The Node PAckage Registry & proxy

Provides a local NPM registry that also proxies and caches unknown node packages from the original npm registry at http://registry.npmjs.org.

Build Status

Install the server

It's available from the official NPM registry, so all you need is:

npm install -g nopar

On my build server I create an archive (see scripts/package) and extract the whole shebang into /usr/local/nopar with an install script (see scripts/install-nopar.sh).

Usage

If you installed NOPAR via npm install -g nopar, then a start script is be installed into your path and you can simply run:

nopar

With the default configuration, the registry is available at http://localhost:5984/. Point your browser at it and you should see an empty registry.

Fill your local registry by configuring the npm command to use it:

npm config set registry http://localhost:5984/
npm cache clear
npm login

Sometimes npm seems confused with cached packages from other repositories, clearing the cache remedies those issues.

The login is required for npm to work but NOPAR doesn't implement any user management and currently accepts everyone.

Install packages with npm install PACKAGE and NOPAR will automatically proxy and cache the packages and dependencies into your private NOPAR.

Of course you can also publish to NOPAR. Those packages won't get promoted to the official registry by NOPAR and will be marked with a green "local" tag in the browser interface.

For configuring the registry, see the section "Default Environment Variables" below.

Default Environment Variables

The service's defaults are configured via environment variables. The following parameters are available:

  • NOPAR_HOSTNAME - Hostname that the service is bound to (default="localhost")
  • NOPAR_PORT - TCP port the service is running on (default=5984)
  • NOPAR_BASE_URL - Used to override base url if hosted behind a reverse proxy (default="")
  • NOPAR_AUTO_FORWARD - "yes" if NOPAR should automatically forward requests for unknown packages to the forwarder registry, "no" if you really just want a local registry without the auto-caching facility (default="yes")
  • NOPAR_IGNORE_CERT - "yes" if NOPAR should ignore invalid SSL certificates for the forwarder server, "no" if NOPAR should not make requests to servers presenting an invalid SSL certificate (default="no")
  • NOPAR_FORWARDER_URL - The URL of the registry NOPAR forwards requests for unknown packages to (default="https://registry.npmjs.org")
  • NOPAR_PROXY_URL - The URL of a proxy to use, empty for not using a proxy (default="")
  • NOPAR_USER_AGENT - The user agent to use to make the requests as (default=nopar/)
  • NOPAR_LOGFILE - Location of the logfile if we spawn, empty for console (default="")
  • NOPAR_LOGLEVEL - Loglevel to use (default="info")
  • NOPAR_REGISTRY_PATH - Location of the registry, leaving this empty will put the registry in a folder "registry" inside the nopar folder (default="")
  • NOPAR_HOME - Homefolder to change to before running, empty for installation location (default="")
  • NOPAR_RUN_PATH - Location for runtime files, primarily the PID file if running as a daemon (default="")
  • NOPAR_RUNAS_USER - The user to run as if running as a daemon, empty for not running as a daemon (default="")
  • NOPAR_META_TTL - The time in seconds until attempting to refresh metadata from "upstream registry" (default=21600)

If the environment variable NOPAR_RUNAS_USER is set, the service will run as a daemon.

You can override some of those settings from within NOPAR on the Settings page. Everything that is set in the Settings page takes priority over the environment variables.

Upstart Configuration

There's an example upstart configuration file that you can use and adapt for your own purpose:

scripts/nopar.conf

Known Issues

  • Missing user management. Welcome to the "Admin Party"!