Git Product home page Git Product logo

yab-explorer's Introduction

yab-explorer

The yab-explorer project is responsible for serving an API to fetch transactions done by users in Yet Another Bridge.

Prerequisites

Getting Started

The project is written in Go. In order to install all the needed dependencies you must run:

make deps

Environment Variables

The following environment variables are required to run the code:

API_PORT=<api_port>
LOGGING_LEVEL=<DEBUG|TRACE|INFO>
POSTGRES_HOST=<postgres_host>
POSTGRES_USER=<postgres_user>
POSTGRES_PASSWORD=<postgres_password>
POSTGRES_DATABASE=<postgres_database>
POSTGRES_PORT=<postgres_port>
GIN_MODE=<release|debug>

The following table describes each environment variable:

Variable Description
API_PORT Specifies the port on which the API server listens for incoming requests. If not provided, the default value is 8080.
LOGGING_LEVEL Determines the level of detail in the logs produced by the application. Allowed values are DEBUG, TRACE or INFO. If not provided, the default value is INFO.
POSTGRES_HOST The hostname or IP address of the PostgreSQL database.
POSTGRES_USER The username used to authenticate with the PostgreSQL database.
POSTGRES_PASSWORD The password associated with the POSTGRES_USER for authenticating with the PostgreSQL database.
POSTGRES_DATABASE The name of the PostgreSQL database.
POSTGRES_PORT The port on which the PostgreSQL server is listening for connections. If not provided, the default value is 5432.
GIN_MODE Controls the logging behavior of the application. Allowed values are release or debug. If not provided, default value is debug.

Run the following command to create a .env file based on .env.example with the required environment variables:

make create_env

This will create a .env file with the required environment variables. Make sure to update the values of the variables in the .env file to match your environment.

Building the code

In order to build the code you must run:

make build

This will clean the project (removing any previous executable file) and build the project. An executable file called:

yab-explorer

will be created.

Running the code

In order to run the code you must run:

make run

This will build the code and then run the executable file that is created.

Cleaning the code

In order to clean the project you must run:

make clean

This will remove the executable file created when the project is built.

yab-explorer's People

Contributors

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