Giter Club home page Giter Club logo

blockchain-in-js's Introduction

blockchain-in-js Build Status

This is an afternoon-project, a blockchain built in node, supporting PoW.

Why Node

Node itself is a more beautiful, flexible and powerful language for internet project, again, I want to show my love to js.

Why a Blockchain from scratch

When it comes to blockchain, most developers only learn how to do Dapp with ethereum, neo, or other existing infrustructure-completed project... I think there is a better way to understand blockchain itself, to build a chain from scratch

This is lovely demo for

  • How Block, Blockchain, node, transaction work with each others.
  • How to do them in Node
  • How to resolve basic conflicts in blockchain
  • How to use sha256 to do PoW(Proof of Work)

Run it on your machine

$ npm clone https://github.com/amazingandyyy/blockchain-in-js.git
$ npm i
$ npm run dev // default on port 3000

<!-- to run more nodes -->
$ npm run nodes // default on port 3000
$ npm run nodes 3000 // listening on port 3000
$ npm run nodes 3001 // listening on port 3001
$ npm run nodes 3002 // listening on port 3002

Routes/HTTP Endpoint

GET /blockchain
GET /blockchain/mine
POST /blockchain/transactions
GET /blockchain/nodes/resolve
POST /blockchain/nodes/register
GET /blockchain/nodes

Author

Andy Chen(amazingandyyy)

LICENSE

MIT

Please feel free to download, clone or send me PR, love you.

JavaScript Style Guide

blockchain-in-js's People

Contributors

amazingandyyy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.