mirror of
https://github.com/KevinMidboe/planetposen-images.git
synced 2025-10-29 05:10:12 +00:00
App for fetching and uploading images to cloud bucket storage
This commit is contained in:
32
cmd/server/main.go
Normal file
32
cmd/server/main.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/kevinmidboe/planetposen-images/config"
|
||||
"github.com/kevinmidboe/planetposen-images/server"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// log.SetFormatter(logrustic.NewFormatter("planetposen-images"))
|
||||
|
||||
log.Info("Starting...")
|
||||
|
||||
ctx := context.Background()
|
||||
config, err := config.LoadConfig()
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
|
||||
var s server.Server
|
||||
|
||||
if err := s.Create(ctx, config); err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
|
||||
if err := s.Serve(ctx); err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user