Skip to content

tokamak-network/trh-backend

Repository files navigation

TRH Backend

This is the backend service for the TRH application. It is built using Go and utilizes the Gin framework for handling HTTP requests and GORM for database interactions.

Getting Started

Prerequisites

  • Go 1.24.11 which is compatible with the version of TRH SDK
  • PostgreSQL

Installation

  1. Clone the repository:

    git clone https://github.com/tokamak-network/trh-backend.git
    cd trh-backend
  2. Copy the example environment file and configure it:

    cp .env.example .env
  3. Update the .env file with your database credentials and other configurations.

Running the Application

  1. Ensure your PostgreSQL server is running and accessible. You can use the docker compose file to start a local postgres server.

    docker compose up -d
  2. Run the application:

    go run main.go
  3. The server will start on the port specified in the .env file (default is 8000).

EFS Cleanup Settings

  • TRH_EFS_CLEANUP_RETENTION_DAYS: retention window for unused EFS cleanup (default: 14)

Contributing

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Create a new Pull Request.

API Documentation

The swagger API documentation is running at the endpoint

http://localhost:${PORT}/swagger/index.html

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Thanks to the contributors of the open-source libraries used in this project.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors