Giter VIP home page Giter VIP logo

private-blockchain-star-ownership-tracking's Introduction

Private Blockchain Application

Build Status

This is a Node JS application that simulates a basic blockchain protocol.

Run the application

Clone this repo to your local computer and proceed with the following steps.

Install dependencies

npm install

Run Jest tests

npm test

Start the application

npm start

Development

If you want to make changes to the code, I recommend following Test Driven Development and start up Jest in watch mode as follows:

npm run test-watch

Now start to make changes to the tests and the application code and watch the tests run!

Testing using POSTMAN

Below are the results of testing using POSTMAN

  1. Run your application using the command npm run start You should see in your terminal a message indicating that the server is listening in port 8000:

Server Listening for port: 8000

  1. To make sure your application is working fine and it creates the Genesis Block you can use POSTMAN to request the Genesis block: Request: http://localhost:8000/block/0
  2. Make your first request of ownership sending your wallet address: Request: http://localhost:8000/requestValidation
  3. Sign the message with your Wallet: Use the Wallet to sign a message
  4. Submit your Star Request: http://localhost:8000/submitstar
  5. Retrieve Stars owned by me Request: http://localhost:8000/blocks/<WALLET_ADDRESS>

VSCode Debugging the app or with Jest

If you want to start the debugger and attach to the running application instance or running Jest tests, then you can use VSCode launch configurations file to do so launch.json. For this project, I am using the following configurations:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "skipFiles": [
        "<node_internals>/**"
      ],
      "program": "${workspaceFolder}/start.js"
    },
    {
      "type": "node",
      "request": "launch",
      "name": "Jest Tests",
      "internalConsoleOptions": "openOnSessionStart",
      "program": "${workspaceFolder}/node_modules/jest/bin/jest"
    }
  ]
}

Issue Reporting

If you experience with bugs or need further improvement, please create a new issue under Issues.

Contributing to this private blockchain!

Pull requests are very welcome. Before submitting a pull request, please make sure that your changes are well tested. Pull requests without tests will not be accepted. In this project we currently use Jest and Supertest.

Authors

This Privae Blockchain: Star Ownership Tracking application was developed as part of the Blockchain Nanodegree with Udacity and Darren Jensen.

License

This Privae Blockchain: Star Ownership Tracking application is released under AGPL

Disclaimer

This application is part of a project assignment and is most definitely not suitable for Production use! :)

private-blockchain-star-ownership-tracking's People

Contributors

jensendarren 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.