s3manager-web/main.go

26 lines
335 B
Go
Raw Normal View History

2016-12-18 22:54:21 +01:00
package main
import (
"log"
"net/http"
"os"
2017-03-09 21:20:40 +01:00
minio "github.com/minio/minio-go"
2016-12-18 22:54:21 +01:00
)
2017-03-09 21:20:40 +01:00
// Server is a server containing a minio client
type Server struct {
s3 *minio.Client
}
2016-12-18 22:54:21 +01:00
func main() {
port := os.Getenv("PORT")
if len(port) == 0 {
port = "8080"
}
2016-12-20 19:47:36 +01:00
router := NewRouter()
2016-12-18 22:54:21 +01:00
2016-12-20 19:47:36 +01:00
log.Fatal(http.ListenAndServe(":"+port, router))
2016-12-18 22:54:21 +01:00
}