Skip to content

bitcodr/re-test

Repository files navigation

Re-Test

API Documentation to Test Online

Update Packs

API Endpoint

Request

{
    "packets": [250, 500, 1000, 2000, 5000]
}

Response

[
    250,
    500,
    1000,
    2000,
    5000
]

Calculate Order Packs

API Endpoint

Request

{
    "items": 251
}

Response

{
    "item": 251,
    "packets": {
        "500": 1
    }
}

To test on a Local machine, follow the steps as below

Prerequisites

Before running any of the Makefile targets, make sure you have the following prerequisites:

  • Go (Golang) installed on your system.
  • Docker and Docker Compose (if you intend to use Docker-related targets).
  • The project's directory structure and necessary configuration files are set up as expected.

Available Makefile Targets

help

This target displays a list of available Makefile targets and their descriptions.

make help

release

This target builds a production binary file of application. It uses the create-env target to ensure the necessary environment files are present.

make release

build

This target builds a development binary file of application. Like release, it also relies on the create-env target.

make build

run

This target runs application in development mode, automatically reloading when code changes are detected. It depends on create-env and uses CompileDaemon for automatic reloading.

make run

create-env

This target creates environment configuration files, such as .env and config.yml. It ensures that these files exist.

make create-env

mod

This target retrieves dependency packages using Go Modules (go mod tidy).

make mod

test

This target runs unit tests for application and provides test coverage information. It relies on tparse for parsing test results.

make test

race

This target runs the data race detector on your application to identify data race conditions. Like test, it uses tparse for parsing test results.

make race

coverage

This target checks the code coverage of your tests and generates a coverage report.

make coverage

lint

This target performs code linting on your project to identify potential issues. It uses golangci-lint for linting.

make lint

docs

This target generates and updates documentation using the Swagger tool (swag). It parses dependencies for documentation.

make docs

docker-build

This target builds Docker containers for your application using Docker Compose. Ensure you have Docker and Docker Compose installed.

make docker-build

docker-up

This target starts your application using Docker Compose in detached mode. It automatically reloads your application within the Docker container.

make docker-up

docker-down

This target stops the Docker containers created with Docker Compose.

make docker-down

docker-log

This target prints the logs of Docker containers. It can be useful for debugging when your application is running inside Docker containers.

make docker-log

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages