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

nko

v0.3.1

Published

node.js knockout deploy check-in

Downloads

49

Readme

node.js knockout deploy check-ins

So, we need to keep track of your deploys for lots of different reasons. Because we want to be as platform-agnostic as possible, we now have this fancy module that will ping the competition website whenever you deploy.

Installation

Add nko to the dependencies section of your package.json:

"dependencies": {
  "nko": "*",
  "other-awesome-stuff": "2.1.4"
}

After that, npm install.

Usage

Just require it somewhere in your normal execution path. We recommend at the top of your server.js:

require('nko')(secret);

The secret parameter is available on your team page (make sure you're signed in to see it). It's tied to just your team, so don't share it with others unless you want them hijacking your deploys.

If for whatever reason, you want to know when we've recorded the deploy, you can pass an optional callback as the second parameter:

require('nko')('<your-team-secret>', function(err, res) {
  if (err) throw err;
  res.on('data', function(d) { console.log(d.toString()); });
});

Important: Not seeing your deploy count rise? Here's what to check:

  • The module will only ping us if the NODE_ENV environment variable is set to production.
  • We wait until your server has been running for 5 seconds before sending the deploy ping, so your server crashes before that, your deploy will not get recorded.
  • We ensure that your server responds to a HTTP GET request on port 80 before recording the deploy.
  • We ensure that the remote IP address from the ping matches the Joyent instance we setup for your team. (So starting up your development machine with NODE_ENV=production will not affect your deploy count.)

Problems?

As always, you can contact us at [email protected] or @node_knockout. You can also try checking the issue tracker.