Skip to content

computools/btc-poc-backned

Repository files navigation

BTC backend

Additional programs

  1. Taskfile (Optional)
  2. docker-compose or podman-compose
  3. Postman

How to run

  1. Run go mod download command to download dependencies

    go mod download
  2. Copy the .env.example file to .env and change variables to what you need

    cp .env.example .env && nano .env
  3. Start the postgres database

    ⓘ NOTE: If you're starting the program by running the taskfile command, you can skip this step because DB will start up automatically, and it does not need additional configuration.

    export POSTGRES_PORT=5432 POSTGRES_USER=postgres POSTGRES_PASSWORD=postgres POSTGRES_DB=btc
    cd containers && docker-compose -f database.yml up -d && cd ..

    Or use next taskfile command:

    task db
  4. Start the keycloak

    export KEYCLOAK_PORT=1141 KEYCLOAK_ADMIN=user KEYCLOAK_ADMIN_PASSWORD=bitnami
    cd containers && docker-compose -f keycloak.yaml up -d && cd ..

    Or use next taskfile command:

    task kc
  5. Configure keycloak and paste KEYCLOAK_CLIENT_ID and KEYCLOAK_CLIENT_CREDENTIALS variables to .env file

  6. Run the following command to start server:

    go run main.go

    Or you can run Run configuration if you are using Goland

    Or you can run the following taskfile command:

    task run
  7. Import BTC collection and BTC-Local environment into Postman program

  8. Send request throw Postman

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published