Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dmytrodemianchuk/go-crud-csv

Application for request an external CSV file with a list of products
https://github.com/dmytrodemianchuk/go-crud-csv

csv docker docker-compose gin-gonic go golang migrations postgresql swagger

Last synced: 1 day ago
JSON representation

Application for request an external CSV file with a list of products

Awesome Lists containing this project

README

        

# Application for request an external CSV file with a list of products
## I used the following concepts during development:
- Building a Web Application with Go, following the REST API design.
- The Clean Architecture approach in building the structure of an application. Dependency injection technique.
- Working with the gin-gonic/gin framework.
- Working with Postgres database. Run from Docker. Generation of migration files.
- Writing SQL queries.

## Prerequisites
- go 1.20
- docker & docker-compose
- swag (optional, used to re-generate swagger documentation)

## Run Project

Create .env file in root directory and add following values:

```
ENV=local

DB_NAME=store
DB_PASSWORD=test
DB_USER=root
DB_HOST=pg

HTTP_HOST=localhost
HTTP_PORT=8080
```

Definition migrating to database

```
make migrate-up
```

Use `make run` to build&run project

```
make run
```

Swagger

http://localhost:8080/swagger/index.html