Skip to content

Commit

Permalink
Import samples from npm (hyperledger-archives#1444)
Browse files Browse the repository at this point in the history
Updated to import samples from npm rather than github
  • Loading branch information
cazfletch authored and Simon Stone committed Jul 3, 2017
1 parent b94d42b commit 854309a
Show file tree
Hide file tree
Showing 19 changed files with 637 additions and 2,089 deletions.
6 changes: 3 additions & 3 deletions packages/composer-playground-api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const http = require('http');
const socketIO = require('socket.io');
const Logger = require('composer-common').Logger;
const Util = require('./lib/util');
const githubRoute = require('./routes/github');
const npmRoute = require('./routes/npm');

const LOG = Logger.getLog('PlaygroundAPI');

Expand All @@ -32,13 +32,13 @@ const LOG = Logger.getLog('PlaygroundAPI');
* @param {number} port The port for the Express.js application.
* @return {Object} The Express.js application.
*/
function createServer(port) {
function createServer (port) {
const method = 'createServer';
LOG.entry(method, port);

const app = Util.createApp();

githubRoute(app);
npmRoute(app);

const connectionProfileStore = new FSConnectionProfileStore(fs);
const connectionProfileManager = new ConnectionProfileManager(connectionProfileStore);
Expand Down
173 changes: 89 additions & 84 deletions packages/composer-playground-api/package.json
Original file line number Diff line number Diff line change
@@ -1,87 +1,92 @@
{
"name": "composer-playground-api",
"version": "0.9.1",
"description": "The REST API for the Hyperledger Composer Playground",
"engines": {
"node": ">=6",
"npm": ">=3"
},
"bin": {
"composer-playground-api": "cli.js"
},
"main": "index.js",
"scripts": {
"pretest": "npm run licchk",
"licchk": "license-check",
"postlicchk": "npm run doc",
"doc": "jsdoc --pedantic --recurse -c jsdoc.conf",
"postdoc": "npm run lint",
"lint": "eslint .",
"start": "node cli.js",
"test": "nyc mocha --recursive -t 10000"
},
"repository": {
"type": "git",
"url": "https://github.com/hyperledger/composer.git"
},
"keywords": [
"blockchain",
"hyperledger",
"solutions"
],
"author": "Hyperledger Composer",
"license": "Apache-2.0",
"license-check-config": {
"src": [
"**/*.js",
"!./cli.js",
"!./coverage/**/*",
"!./node_modules/**/*",
"!./out/**/*"
"name": "composer-playground-api",
"version": "0.9.1",
"description": "The REST API for the Hyperledger Composer Playground",
"engines": {
"node": ">=6",
"npm": ">=3"
},
"bin": {
"composer-playground-api": "cli.js"
},
"main": "index.js",
"scripts": {
"pretest": "npm run licchk",
"licchk": "license-check",
"postlicchk": "npm run doc",
"doc": "jsdoc --pedantic --recurse -c jsdoc.conf",
"postdoc": "npm run lint",
"lint": "eslint .",
"start": "node cli.js",
"test": "nyc mocha --recursive -t 10000"
},
"repository": {
"type": "git",
"url": "https://github.com/hyperledger/composer.git"
},
"keywords": [
"blockchain",
"hyperledger",
"solutions"
],
"path": "header.txt",
"blocking": true,
"logInfo": false,
"logError": true
},
"devDependencies": {
"chai": "^3.5.0",
"chai-http": "^3.0.0",
"eslint": "^3.17.1",
"jsdoc": "^3.4.3",
"license-check": "^1.1.5",
"mocha": "^3.2.0",
"nyc": "^10.1.2",
"proxyquire": "^1.7.11",
"sinon": "^1.17.7"
},
"dependencies": {
"body-parser": "^1.17.0",
"composer-common": "^0.9.1",
"composer-connector-server": "^0.9.1",
"dotenv": "^4.0.0",
"express": "^4.15.2",
"http-status": "^1.0.1",
"request": "^2.81.0",
"socket.io": "^1.7.3"
},
"nyc": {
"exclude": [
"coverage/**",
"out/**",
"scripts/**",
"systest/**",
"test/**"
],
"reporter": [
"text-summary",
"html"
],
"all": true,
"check-coverage": true,
"statements": 44,
"branches": 44,
"functions": 46,
"lines": 44
}
"author": "Hyperledger Composer",
"license": "Apache-2.0",
"license-check-config": {
"src": [
"**/*.js",
"!./cli.js",
"!./coverage/**/*",
"!./node_modules/**/*",
"!./out/**/*"
],
"path": "header.txt",
"blocking": true,
"logInfo": false,
"logError": true
},
"devDependencies": {
"chai": "^3.5.0",
"chai-http": "^3.0.0",
"eslint": "^3.17.1",
"jsdoc": "^3.4.3",
"license-check": "^1.1.5",
"mocha": "^3.2.0",
"nyc": "^10.1.2",
"proxyquire": "^1.7.11",
"sinon": "^1.17.7"
},
"dependencies": {
"async": "^2.5.0",
"body-parser": "^1.17.0",
"composer-common": "^0.9.1",
"composer-connector-server": "^0.9.1",
"dotenv": "^4.0.0",
"express": "^4.15.2",
"http-status": "^1.0.1",
"npm-registry-client": "^8.4.0",
"pkginfo": "^0.4.0",
"request": "^2.81.0",
"semver": "^5.3.0",
"socket.io": "^1.7.3",
"tar": "^3.1.5"
},
"nyc": {
"exclude": [
"coverage/**",
"out/**",
"scripts/**",
"systest/**",
"test/**"
],
"reporter": [
"text-summary",
"html"
],
"all": true,
"check-coverage": true,
"statements": 44,
"branches": 44,
"functions": 46,
"lines": 44
}
}
127 changes: 0 additions & 127 deletions packages/composer-playground-api/routes/github.js

This file was deleted.

Loading

0 comments on commit 854309a

Please sign in to comment.