Skip to content

giantape/berlin-blockchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Berlin-blockchain

lets try create a Blockchain with nodejs and frontend with angular. need collaborations, feel free to create a pull request.

for now available APIS:

  1. /blocks (GET)
  2. /mine (POST)
  3. /transactions (GET)
  4. /mine-transactions (GET)
  5. /transact (POST)
  6. /public-key (GET)

frontend will be created with Angular.

npm run dev

  • to start the application npm i, after done run npm run dev
  • to run test npm run test she application will run in localhost:3001

to testing P2P with socket

  • open terminal first window and run npm run dev this will run in port 3001
  • open second window run HTTP_PORT=3002 P2P_PORT=5002 PEERS=ws://localhost:5001 npm run dev (to run in port 3002)

testing with Postman

  1. to create a transaction localhost:<3001 or 3002>/transact

    • example params: { "recipient": "3002-4ddr355", "amount": 30 }
  2. to fetch all blocks transaction http://localhost:<3001 or 3002>/transactions

  3. to get publicKey http://localhost:<3001 or 3002>/public-key

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published