Skip to content

mamude/gin-upload-file

Repository files navigation

Gin Upload File

Upload large files with Golang

How to run Golang App

Build App and run migration-up

make build-app
make migrate-up

Open the browser at

http://localhost:8080/

Tables

CREATE TABLE IF NOT EXISTS customers(
    id SERIAL PRIMARY KEY,
    cpf VARCHAR (14) NOT NULL,
    private INT NOT NULL,
    incomplete INT NOT NULL,
    date_last_purchase TIMESTAMP,
    average_ticket DECIMAL(10,2) DEFAULT(0.00),
    last_purchase_ticket DECIMAL(10,2) DEFAULT(0.00),
    most_frequent_store VARCHAR(18),
    last_purchase_store VARCHAR(18),
    created_at TIMESTAMP DEFAULT 'now()'
);

MakeFile

Migration tool

make tools

Build the application

make build-app
make build-local

Run the application

make run

Create DB container

make docker-run

Shutdown DB container

make docker-down

Migrate DB

make migrate-up
make migrate-down

Test the application

make test-local

Clean the binary

make clean-local

Live Reload

make watch

Continuous Integration

.PHONY: test
test:
	@go test -coverprofile=cover.out ./...

.PHONY: clean
clean:
	@rm -f cover.*

About

Upload large files with Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published