Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vladpetriv/scanner_backend
backend side represented as full-stack application with go-template for processing data from tg scanner
https://github.com/vladpetriv/scanner_backend
backend golang kafka postgresql
Last synced: 11 days ago
JSON representation
backend side represented as full-stack application with go-template for processing data from tg scanner
- Host: GitHub
- URL: https://github.com/vladpetriv/scanner_backend
- Owner: VladPetriv
- License: mit
- Created: 2022-04-11T07:25:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-13T19:50:37.000Z (over 1 year ago)
- Last Synced: 2023-06-28T00:03:58.443Z (over 1 year ago)
- Topics: backend, golang, kafka, postgresql
- Language: Go
- Homepage:
- Size: 427 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
```bash
git clone [email protected]:VladPetriv/scanner_backend.git
```Go to the project directory
```bash
cd scanner_backend
```Install dependencies
```bash
go mod download
```Start the server locally:
```bash
# Make sure that Apache Kafka and PostgreSQL are running
make run
```## Running Tests
To run tests, run the following command:
```bash
# Run it only if "mocks" folder not exist or if you updated "repository.go" files
make mock
``````bash
make test
```
## License[MIT](https://choosealicense.com/licenses/mit/)