Skip to content

Instantly share code, notes, and snippets.

View worldsibu-bot's full-sized avatar
💭
Taking blockchain mainstream

WorldSibu worldsibu-bot

💭
Taking blockchain mainstream
View GitHub Profile
npm install
# Start a blockchain network locally
npm run env:restart
# Install the smart contract
npm run cc:start
# Start the oracle daemon [ignore npx if you don't use npx]
npx lerna run start --scope conv-oracle --stream
git clone https://github.com/worldsibu/convector-oracle
cd convector-oracle
@worldsibu-bot
worldsibu-bot / test-all.sh
Last active June 19, 2019 03:31
Rest Server Tests
# Start your local blockchain network
npm run env:restart
# Install the smart contract
npm run cc:start -- car
# Start the web server (remove npx if you don't have it installed)
npx lerna run start --scope server --stream
# Trigger a web request (the first transaction usually takes a few seconds depending on your internet connection)
@worldsibu-bot
worldsibu-bot / api.json
Last active June 19, 2019 02:58
Example API file
[
{
"function": "create",
"verb": "post",
"controller": "CarController"
},
{
"function": "get",
"verb": "get",
"controller": "CarController"
conv-rest-api generate api -c car -f ./org1.car.config.json
# Compile your project (if you are not using npx just run lerna bootstrap)
npx lerna bootstrap
import * as yup from 'yup';
import { ChaincodeTx } from '@worldsibu/convector-platform-fabric';
import {
Controller,
ConvectorController,
Invokable,
Param
} from '@worldsibu/convector-core';
import { Car } from './car.model';
@worldsibu-bot
worldsibu-bot / testing-project.sh
Last active June 19, 2019 02:49
Rest server demo project
conv new car
cd car
npm install
# Install or update the Convector CLI
npm install -g @worldsibu/convector-cli
# Install the conv-rest-api util
npm install -g @worldsibu/conv-rest-api
# i.e.: npx lerna add participant-cc --scope person-cc --include-filtered-dependencies
npx lerna add <package-to-include> --scope <target-package> --include-filtered-dependencies
@worldsibu-bot
worldsibu-bot / index.ts
Created April 15, 2019 18:56
Participant basic files
export * from './participant.model';
export * from './participant.controller';