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

cvr-view

v2.0.1

Published

**The easy open source way to privately host your code coverage.**

Downloads

17

Readme

CVR View

The easy open source way to privately host your code coverage.

line cvr

CVR View is an Express application for hosting your code coverage results. If you'd like to host your coverage internally, or without paying for monthly services, CVR View might be for you.

To get started, using the seed project is recommended to make your future updating as simple as a new npm install.

MIT Licensed

Configuration

Configuration requires some setup and copying of related details into environment variables on the machine hosting Node.js:

  • Create a GitHub Application
  • Host a MongoDB Instance
  • Host CVR on Node.js
  • Expose a domain name to the hosted instance

Required Environment Variables

The required configuration information is for GitHub OAuth and the MongoDB connection string. This info can be specified in either a .env file in the project root, or via environment variables. A .env-sample file is included that you can fill out and rename as .env.

If required variables are missing a crash will occur.

  • GITHUB_CLIENTID GitHub OAuth Client ID
  • GITHUB_CLIENTSECRET GitHub OAuth Client Secret
  • GITHUB_CALLBACKURL GitHub OAuth Callback URL
  • DB_CONN MongoDB Connection String
  • HOST The host the server will run on

Optional Environment Variables

  • GITHUB_ORGS_WHITELIST Optional array of allowed GitHub orgs. If empty or omitted, all orgs are allowed.
  • MAX_REPO_COMMIT_HISTORY By default only the last 20 commits per repo are saved to conserve storage space.

Create a GitHub Application

A GitHub application must be created through GitHub.com to give access to repos in your organization. It is not recommended to make the application on this page https://github.com/settings/applications/new but if you select the relevant organization from the bottom left of the page and then select Applications on the left, you can make the application under the organization's account.

  • Application name can be anything you recognize, cvr will do.
  • Homepage URL should be the address where you are hosting your CVR server, maybe something like https://cvr.domain.com.
  • Authorization Callback URL should be the domain above with the added path /auth/github/callback, so with our example that would be https://cvr.domain.io/auth/github/callback. This is the same URL to use for the environment variable GITHUB_CALLBACKURL
  • Save the settings and grab the Client ID and Client Secret from the top right of the page for use with the corresponding environment variables.

Host a MongoDB Instance

If you are not familiar with hosting MongoDB, using a service like MongoLab is recommended. Once you create an instance and user, grab the connection string, which is a URL, and assign it to the DB_CONN environment variable. This URL starts with mongodb://.

Host CVR on Node.js

Running the service with something like Forever that provides automatic restarts is recommended. For example:

  • npm install
  • npm install forever -g
  • forever start bin/www

Expose a Domain Name to the Hosted Instance

The application will need to be hosted under a domain that matches the one you entered when creating the GitHub application. This needs to be configured at the DNS level, generally as a CNAME.