genesis-kma-school-entry

command module
v0.0.0-...-8bbfd3c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 17 Imported by: 0

README

genesis-kma-school-entry

Test task for Genesis & KMA Software Engineering School 4.0

Installation Steps

Local Development
  1. Install Golang by following the official installation guide: Golang Installation Guide

  2. Clone the repository:

    git clone https://github.com/Hukyl/genesis-kma-school-entry.git
    
  3. Navigate to the project directory:

    cd genesis-kma-school-entry
    
  4. Copy the .env.sample file and rename it to .env (make sure .env file is on the same directory level as docker-compose.yml):

    cp .env.sample .env
    
  5. Install the project dependencies:

    go mod download
    
  6. Start the local development server:

    go run main.go
    

The base url will be available at localhost:<port>.

Running Services in Docker Compose
  1. Install Docker by following the official installation guide: Docker Installation Guide

  2. Clone the repository:

    git clone https://github.com/your-username/genesis-kma-school-entry.git
    
  3. Navigate to the project directory:

    cd genesis-kma-school-entry
    
  4. Copy the .env.sample file and rename it to .env (make sure .env file is on the same directory level as docker-compose.yml):

    cp settings/.env.sample .env
    

    NOTE: some of the variables are hardcoded into docker-compose.yml to ensure that the API uses the container database.

  5. Build and start the Docker containers:

    docker compose up -d
    

The base url will be available at 127.0.0.1:<port>.

Endpoints

The endpoints fully conform to the provided endpoint schemas in Swagger documentation.

Get USD-UAH rate
  • Method: GET
  • URL: /rate
  • Purpose: provides a USD-UAH current rate.
Subscribe to email notifications
  • Method: POST
  • URL: /subscribe
  • Form-data parameter: email
  • Purpose: subscribe to daily email notifications of rate

Testing

Most of the subpackages are covered by unittests. In order to run tests:

go test -v ./...

License

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

© 2024-current Andrii Shalaiev. All Rights Reserved.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL