Socket
Socket
Sign inDemoInstall

nko

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nko

node.js knockout deploy check-in


Version published
Weekly downloads
9
decreased by-30.77%
Maintainers
3
Weekly downloads
 
Created
Source

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 all@nodeknockout.com or @node_knockout. You can also try checking the issue tracker.

Keywords

FAQs

Package last updated on 06 Nov 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc