Giter Site home page Giter Site logo

go-blockchain's Introduction

Blockchain

Helped with Code your own blockchain in less than 200 lines of Go! tutorial I built my own Blockchain in Go

Run

go run main.go starts a server in the configured address (port can be changed in .env file)

Add a new block to the Blockchain

POST localhost:8080

{"BPM":60}

Run with local concourse

docker build -f Dockerfile.pi -t go-blockchain . builds the image

docker-compose up creates concourse and postgre SQL database (if don't want to keep it running just add -d)

fly login -t main -c http://127.0.0.1:8080

fly -t main sp -p go-blockchain -c ci/pipeline.yml -l /.credentials.yml starts a pipeline (fly -t {team} sp -p {pipelineName} -c {pipelineFile} -l {credentialsYmlFile})

Credentials file must be like this:

git_private_key: |
  -----BEGIN RSA PRIVATE KEY-----
  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  -----END RSA PRIVATE KEY-----

dockerhub_password: XXXXXXXX

We shoud see the pipeline going to http://127.0.0.1:8080

Then running docker build -t go-blockchain . from the root, where we have the Dockerfile, we build the image and we can see it running docker ps -a

docker run -p 33333:8080 -t go-blockchain run the image in port 33333

go-blockchain's People

Contributors

marioarranzr avatar

Stargazers

 avatar

Watchers

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