Skip to content

Instantly share code, notes, and snippets.

View mohammadobaid1's full-sized avatar
🏠
Working from home

Muhammad Obaid mohammadobaid1

🏠
Working from home
View GitHub Profile
sasamsas
@mohammadobaid1
mohammadobaid1 / file1.txt
Created July 9, 2017 08:28
the description for this gist
String file contents
@mohammadobaid1
mohammadobaid1 / docker-compose.yaml
Last active July 26, 2017 14:24
Adding organizations
version: '2'
services:
ca.org1.example.com:
image: hyperledger/fabric-ca:x86_64-1.0.0-rc1
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/36563da2256ce86097c305f779b48664938a30bd8e7614d79fa2025808dd5469_sk
@mohammadobaid1
mohammadobaid1 / ca file
Created July 22, 2017 14:25
custom fabric-ca file
#############################################################################
# Affiliation section
#############################################################################
affiliations:
org1:
- department1
- department2
org2:
- department1
org3:
#
# SPDX-License-Identifier: Apache-2.0
#
#############################################################################
# The CA section contains information specific to this Certificate Authority.
# Minimally, the name must be unique for all CAs serviced by the same server.
# Additionally, you may specify any of the settings that are defined in the
# server's configuration file to override them with a value specific for this CA.
# For example, you should provide a different username and password for the
# bootstrap identity as found in the "identities" subsection of the "registry" section.
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
services:
ca.org1.example.com:
TxValidationCode {
VALID = 0;
NIL_ENVELOPE = 1;
BAD_PAYLOAD = 2;
BAD_COMMON_HEADER = 3;
BAD_CREATOR_SIGNATURE = 4;
INVALID_ENDORSER_TRANSACTION = 5;
INVALID_CONFIG_TRANSACTION = 6;
UNSUPPORTED_TX_PAYLOAD = 7;
BAD_PROPOSAL_TXID = 8;
#############################################################################
# This is a configuration file for the fabric-ca-server command.
#
# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES
# ------------------------------------------------
# Each configuration element can be overridden via command line
# arguments or environment variables. The precedence for determining
# the value of each element is as follows:
# 1) command line argument
# Examples:
///////////////////////////////////////////////////////////////////////////////
///////////////////////// REST ENDPOINTS START HERE ///////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Register and enroll user
app.post('/users', function(req, res) {
var username = req.body.username;
var orgName = req.body.orgName;
logger.debug('End point : /users');
logger.debug('User name : ' + username);
logger.debug('Org name : ' + orgName);
import { Component , Input } from '@angular/core';
import { AppService } from '~/./../app/app.service';
import { FormsModule } from '@angular/forms';
@Component({
selector: 'formpage',
templateUrl:'./formpage.html',
})
export class FormpageComponent {
constructor(private exampleService: AppService) {}
testResponse:any;