Simple REST API with File Upload Support
To run this project, you will need to add the following environment variables to your .env file
PORT
#Optional, default 8080
BASE_URL
DB_HOST
DB_PORT
DB_USER
DB_PASSWORD
DB_NAME
JWT_SECRET
Install Soda CLI, skip if already Installed
go install github.com/gobuffalo/pop/v6/soda@latest
Clone the project
git clone https://github.com/pengdst/golang-file-upload
or using SSH
git clone git@github.com:pengdst/golang-file-upload.git
Go to the project directory
cd golang-file-upload
Create environment
cp .env.example .env
Migrate Database
soda create -e development -c db/database.yml
soda migrate -e development -c db/database.yml
Or Migrate all Environment Database
soda create -a -c db/database.yml
soda migrate -a -c db/database.yml
Install dependencies
go mod download
go mod tidy
Run App
go run github.com/pengdst/golang-file-upload/cmd
Build Binary App
go build github.com/pengdst/golang-file-upload/cmd
Framework Gin
Environment GodotEnv, caarlos0/env