cf-deployment-tracker-client
Advanced tools
Comparing version 0.0.7 to 0.0.8
{ | ||
"name": "cf-deployment-tracker-client", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"private": false, | ||
@@ -11,3 +11,3 @@ "main": "tracker.js", | ||
"dependencies": { | ||
"restler": "*" | ||
"restler": "3.3.0" | ||
}, | ||
@@ -14,0 +14,0 @@ "author": [ |
# Overview | ||
This is an npm module that can track and report details of a demo/tutorial that has been deployed to Cloud Foundry | ||
This is an npm module that can track and report details of a demo/tutorial that has been deployed to Cloud Foundry. | ||
# To Use | ||
1. Add cf-deployment-tracker-client as a dependency to your `package.json`. | ||
2. Require the package in your main entry point to your app (probably app.js). `require("cf-deployment-tracker-client").track();` | ||
1. Open a terminal and run | ||
``` | ||
npm install cf-deployment-tracker-client --save | ||
``` | ||
2. Require the package in your main entry point to your app (probably app.js). | ||
``` | ||
require("cf-deployment-tracker-client").track(); | ||
``` | ||
# Example app | ||
To see how to include this into your app please visit [Bluemix Hello World]()https://github.com/IBM-Bluemix/bluemix-hello-node. You will want to pay attention to [package.json](https://github.com/IBM-Bluemix/bluemix-hello-node/blob/master/package.json#L9), and [server.js](https://github.com/IBM-Bluemix/bluemix-hello-node/blob/master/server.js#L15). | ||
To see how to include this into your app please visit [Bluemix Hello World](https://github.com/IBM-Bluemix/bluemix-hello-node). You will want to pay attention to [package.json](https://github.com/IBM-Bluemix/bluemix-hello-node/blob/master/package.json#L9), and [server.js](https://github.com/IBM-Bluemix/bluemix-hello-node/blob/master/server.js#L15). | ||
@@ -14,0 +20,0 @@ # Privacy Notice |
// Licensed under the Apache 2.0 License. See footer for details. | ||
var express = require("express"), | ||
restler = require("restler"), | ||
path = require("path"); | ||
'use strict'; | ||
var restler = require('restler'), | ||
path = require('path'); | ||
function track() { | ||
var pkg = require(path.join(path.dirname(module.parent.filename), "package.json")), | ||
var pkg = require(path.join(path.dirname(module.parent.filename), 'package.json')), | ||
vcapApplication; | ||
@@ -38,5 +39,5 @@ | ||
var url = "https://deployment-tracker.mybluemix.net/api/v1/track"; | ||
restler.postJson(url, event).on("complete", function (data) { | ||
console.log("Uplodaed stats"); | ||
var url = 'https://deployment-tracker.mybluemix.net/api/v1/track'; | ||
restler.postJson(url, event).on('complete', function (data) { | ||
console.log('Uploaded stats', data); | ||
}); | ||
@@ -43,0 +44,0 @@ } |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
16312
1
36
+ Addedrestler@3.3.0(transitive)
- Removedrestler@3.4.0(transitive)
Updatedrestler@3.3.0