From b52f13ee8b93ae13098b77c6e143dff414589bde Mon Sep 17 00:00:00 2001
From: Imbus <>
Date: Fri, 8 Mar 2024 10:25:22 +0100
Subject: [PATCH] Better developer feedback

---
 backend/main.go | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/backend/main.go b/backend/main.go
index d7713c9..523a6a0 100644
--- a/backend/main.go
+++ b/backend/main.go
@@ -1,13 +1,14 @@
 package main
 
 import (
-	"encoding/json"
 	"fmt"
+	"os"
 	_ "ttime/docs"
 	"ttime/internal/config"
 	"ttime/internal/database"
 	"ttime/internal/handlers"
 
+	"github.com/BurntSushi/toml"
 	"github.com/gofiber/fiber/v2"
 	"github.com/gofiber/swagger"
 	_ "github.com/mattn/go-sqlite3"
@@ -35,9 +36,11 @@ func main() {
 		_ = conf.WriteConfigToFile("config.toml")
 	}
 
-	// Pretty print the current config
-	str, _ := json.MarshalIndent(conf, "", "  ")
-	fmt.Println(string(str))
+	// Pretty print the current config with toml
+	toml.NewEncoder(os.Stdout).Encode(conf)
+
+	fmt.Printf("Starting server on http://localhost:%d\n", conf.Port)
+	fmt.Printf("For documentation, go to http://localhost:%d/swagger/index.html\n", conf.Port)
 
 	// Connect to the database
 	db := database.DbConnect(conf.DbPath)