nice-registry
A proxy to the npm registry that serves up nice package metadata.
Installation
npm install nice-registry --save
Configuration
The nice registry uses sensible defaults, but can be configured using environment variables.
NICE_CACHE_PATH | path.join(process.cwd(), '.cache' |
NICE_GITHUB_ACCESS_TOKEN | undefined |
NICE_CACHE_TTL_PACKAGES | 1 week |
NICE_CACHE_TTL_REPOS | 1 week |
NICE_CACHE_TTL_CONTRIBUTORS | 1 month |
NICE_CACHE_TTL_DEPENDENTS | 1 month |
NICE_CACHE_TTL_DOWNLOADS | 3 months |
NICE_CACHE_TTL_OWNERS | 1 year |
The nice registry allows caches to be configured granularly, as package and repo data
change frequently while user profiles seldom change.
The TTL values are human intervals specifying
"time to live", or how long each type of data can live in the cache before being refetched.
Tests
npm install
npm test
Dependencies
- express: Fast, unopinionated, minimalist web framework
- fs-extra: fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.
- human-interval: Human readable time measurements
- isomorphic-fetch: Isomorphic WHATWG Fetch API, for Node & Browserify
- lodash: Lodash modular utilities.
- mkdirp: Recursively mkdir, like
mkdir -p
- nice-package: Clean up messy package metadata from the npm registry
- registry-url: Get the set npm registry URL
- serve-favicon: favicon serving middleware with caching
Dev Dependencies
- chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
- dependent-packages: Offline collection of the dependents and devDependents of every package in the npm registry.
- mocha: simple, flexible, fun test framework
- standard: JavaScript Standard Style
- supertest: SuperAgent driven library for testing HTTP servers
License
MIT