Go Quickstart
This project is a simple web application that demonstrates how to upload files to a Tigris storage bucket and manage them. It is an HTTP server written in Go that serves up a single web page, preconfigured to deploy to Fly.io.
All of the code in main.go is heavily commented to better help you understand what each section is doing.
How to deploy this project
This project is designed to be easily deployed to Fly.io.
Before you get started, make sure you have a Fly.io account and the fly CLI installed on your computer.
Start by cloning the project to your computer:
git clone https://github.com/tigrisdata-community/tigris-go-quickstart.git
Open the repository in the editor of your choice. Since all applications on Fly need to be globally unique, change the value of app in the fly.toml file before attempting to deploy:
# ...
app = 'tigris-go-quickstart' # Update this
# ...
Once updated, run the following command to configure the app in your Fly account, accepting the defaults when prompted:
fly launch
Take note of the URL to access your app:
Visit your newly deployed app at https://{APP_NAME}.fly.dev/
Before you can access the app, you'll need to configure the Tigris storage bucket. Run the following command to create the bucket and set the necessary environment variables on your Fly app. Accept the defaults when prompted.
fly storage create
Now navigate to the URL from the previous step and you should be presented with the app.