Giter Club home page Giter Club logo

connect-private-blockchain-project-3's Introduction

Project #3: RESTful API with Node.js Framework

This is Project 3: RESTful API with Node.js Framework. In this project I created two endpoints to access and add blocks to my private blockchain.

Setup project for Review.

To setup the project for review do the following:

  1. Download the project.
  2. Run command npm install to install the project dependencies.
  3. Run command node simpleChain.js in the root directory to generate a blockchain with test blocks.
  4. Run command node app.js to start server. Access the server at the following address:
http://localhost:8000/

Project Features

  • Node.js Framework This project uses Express.js, a fast, unopinionated, minimalist framework for Node.js. More information can be found at:
    https://expressjs.com
    

The project featurs 2 endpoints:

1. GET Block

URL: http://localhost:8000/block/[blockheight]

Example URL path: http://localhost:8000/block/3 -> where '3' is the block height

Response: The response provides a block object of corresponding height in JSON format.

2. POST Block

URL: http://localhost:8000/block

Payload:

  {
    "data": "insert block body data here"
  }

Response: The response provides a newly generated block, containing corresponding payload data, in JSON format.

connect-private-blockchain-project-3's People

Contributors

chrisfranz avatar

Watchers

James Cloos 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.