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

koa-c3po

v0.0.20

Published

A Boilerplate application for building REST APIs. This is not stable. If you are not me there is no reason to use at this point.

Downloads

27

Readme

Summary

This is a simple framework based on koa that incorporates logging, instrumentation, and tracing by default.

Configuration

Configuration is done by default in yaml files. In the working directory the application will use config.yaml as the default profile and config-{profile}.yaml for other profiles. In addition the default config may also contain profile yaml segments as a multi-document yaml. If this is done all segments other than the default should contain a profile key to signify what profile it represents.

Values are retrieved in the following order, from lowest precedence to highest:

  • default values in app
  • values from the default config
  • values from a profile specific config (in order of precedence)
  • environment variables

For profiles they are listed in increasing order of precedence. As an example if profiles are "default,a,b" values in b will override values in a or default. If default is not listed it is added as the first element in the profile list.

Logging

Jaeger

Jaeger config is as follows:

jaeger:
  enabled: true
  config:
    serviceName: 'my-awesome-service'
    reporter:
      logSpans: true
      agentHost: 'localhost'
      agentPort: 6832
    sampler:
      type: 'probabilistic'
      param: 1.0    

TODO: add option section once implemented

For values see: https://github.com/jaegertracing/jaeger-client-node/blob/master/src/configuration.js#L37

Prometheus

TODO: Not much in the way of configuration but document once I surface

Running

PROFILES={comma separated profiles} A2R={example to run} node index.js

to run application 1:

PROFILES=logging,jaeger A2R="./example01/" ./build/nodejs/node-v8.10.0-linux-x64/bin/node index.js

to run application 2:

PROFILES=app2,logging,jaeger2 A2R="./example02/" ./build/nodejs/node-v8.10.0-linux-x64/bin/node index.js