Skip to content

Latest commit

 

History

History
49 lines (39 loc) · 1.17 KB

README.md

File metadata and controls

49 lines (39 loc) · 1.17 KB

blockchainDemo

Demonstrating simple usecase for blockchain using JavaScript.

Scenario:

      Let's consider there is a Company ABC1 which is having one shared ODC/Room. This room is used by more than 2 companies to deploy their employees to work for ABC1 company.
      Now each vendor requires to request for a seatCode before deploying their employees to work there. This can be demonstrated as a simple blockchain network by using the current application.

APIs:

You can use the below APIs to see the app in action.


Get Blockchain get API
http://localhost:9009/seatCodeChain

Get Available seatcodes get API
http://localhost:9009/availableSeatCodes

Request a seatcode post API
http://localhost:9009/requestSeatCode

you need to send below requestObj
{	
   "companyCode": "COMPANY1",
   "empCode": "EMP1"
}

Mining seatcodes get API
http://localhost:9009/mining

This will confirm the seatcodes and also add few more seatcodes to be available for next requests.