scanner_backend

module
v0.0.0-...-71e9963 Latest Latest
Warning

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

Go to latest
Published: May 13, 2023 License: MIT

README

scanner_backend

scanner_backend is a backend side represented as full-stack application with go-template for processing data from tg scanner

Tech Stack

Server:

  • gorilla/mux
  • Apache Kafka
  • Go Templates

DB:

  • PostgreSQL
  • golang-migrate/migrate

Testing:

  • stretchr/testify
  • DATA-DOG/go-sqlmock
  • mockery/mockery

Environment Variables

To run this project, you will need to add the following environment variables to your ".env" file:

  • POSTGRES_USER - PostgreSQL user
  • POSTGRES_PASSWORD - PostgreSQL user password
  • POSTGRES_HOST - PostgreSQL host
  • POSTGRES_DB - PostgreSQL database name
  • MIGRATIONS_PATH - Path to migrations:“file://./db/migrations”
  • PORT - Bind address which server will use
  • DATABASE_URL - this field you can use if you don’t want to create PostgreSQL fields

Run Locally

Clone the project

   git clone [email protected]:VladPetriv/scanner_backend.git

Go to the project directory

  cd scanner_backend

Install dependencies

  go mod download

Start the server locally:

  # Make sure that Apache Kafka and PostgreSQL are running
  make run

Running Tests

To run tests, run the following command:

  # Run it only if "mocks" folder not exist or if you updated "repository.go" files
  make mock 
  make test 

License

MIT

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

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