A webservice that dishes out files from npm packages.
npm-cdn downloads tarballs from the npm registry and stores them on disk. First-time requests for a package are slow because the entire package tarball has to be fetched, but subsequent requests for files in the same package should be pretty fast.
Caveat npmtor: This is a proof of concept app. It works, but it's experimental. It's running on a single Heroku dyno so it won't scale. To become a real thing it will need to sit behind a CDN.
To access a file inside a published npm package, use the following pattern:
When a package is downloaded, index files are generated in HTML and JSON format.
- /firstname.lastname@example.org renders an HTML page with links to all the files in the package.
- /email@example.com/?json returns
a JSON array of all the files in the package. You can also set an
application/jsonAccept header in the request instead of using the
If you request a package without specifying a version, you'll be redirected to the index for the latest version of the package:
npm installnpm test
- request: Simplified HTTP request client.
- restify: REST framework
- tar-fs: filesystem bindings for tar-stream
- mocha: simple, flexible, fun test framework
- nixt: Simple and powerful testing for command-line apps
- nodemon: Simple monitor script for use during development of a node.js app.
- rimraf: A deep deletion module for node (like
Generated by package-json-to-readme