Skip to content

wechicken456/file-storage-server

Repository files navigation

learn-file-storage-s3-golang-starter (Tubely)

File storage application in Golang to learn AWS S3 buckets, policies, groups, roles.

Also learned range requests for videos, JWT authentication, ffmpeg, and sqlite3.

List of the things I learned and some notes taken during development of this project is in my_notes.md.

1. Install dependencies

  • Go
  • go mod download to download all dependencies
  • FFMPEG - both ffmpeg and ffprobe are required to be in your PATH.
# linux
sudo apt update
sudo apt install ffmpeg

# mac
brew update
brew install ffmpeg
  • SQLite 3 only required for you to manually inspect the database.
# linux
sudo apt update
sudo apt install sqlite3

# mac
brew update
brew install sqlite3

2. Download sample images and videos

./samplesdownload.sh
# samples/ dir will be created
# with sample images and videos

3. Configure environment variables

Copy the .env.example file to .env and fill in the values.

cp .env.example .env

You'll need to update values in the .env file to match your configuration.

3. Run the server

go run .
  • You should see a new database file tubely.db created in the root directory.
  • You should see a new assets directory created in the root directory, this is where the images will be stored.
  • You should see a link in your console to open the local web page.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors