Code Monkey home page Code Monkey logo

blockchainbackendproject's Introduction

BlockchainBackendProject

Run with docker

docker-compose up

This will provide :

  • An api exposing its endpoint to create a player and a wallet
  • A mock api to simulate the creation of a wallet on a blockchain which will be called by the other api
  • A postgres database to store created users and wallets

Call endpoint

The endpoint is exposed on the port 5000 :

http://localhost:5000/

The only method supported is POST

Header to provide :

Content-Type : application/json

Example of body to provide :

{
    "username" : "johndoe",
    "password" : "Foobar.1",
    "pin_code" : "123456"
}

Response

This endpoint will successfully respond with a body providing the name and the wallet address

{
    "username":"johndoe",
    "wallet_address":"1aec6b68-4918-4a24-9792-3756086c9925"
}

Run unit tests

go test

gotest

Run benchmarks

go test -bench=.

benchmarks

Performance tests

k6 is installed on the Backend container and test scripts are provided

You can open a terminal on this container and run the tests

Interact with container

docker exec -it containerAddress

Run tests

k6 run sample_test.js

Provided scripts

  • sample_test.js
  • load_test.js
  • stress_test.js
  • spike_test.js

You should see this kind of output sample_test

With spike test (There are some failures) : sample_test

blockchainbackendproject's People

Contributors

cyrilchc avatar

Watchers

 avatar

Forkers

planducteur

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.