Add files via upload

This commit is contained in:
Tomáš Dvořák
2025-05-22 12:13:11 +02:00
committed by GitHub
parent 43cfef2b12
commit a6d2e2635f
2 changed files with 12 additions and 4 deletions
+3 -3
View File
@@ -48,7 +48,7 @@
</div>
<h2 class="text-xl font-bold text-gray-800 mb-2">Záznam služebních jízd</h2>
<p class="text-gray-600 mb-4">Jednoduchý systém pro evidenci a správu jízd služebními vozidly.</p>
<a href="/evidence-aut" class="block text-center bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
<a href="/evidence-aut/" class="block text-center bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Otevřít aplikaci
</a>
</div>
@@ -60,7 +60,7 @@
</div>
<h2 class="text-xl font-bold text-gray-800 mb-2">Kontaktní formulář</h2>
<p class="text-gray-600 mb-4">Formulář pro kontaktování vedení společnosti.</p>
<a href="/kontakt" class="block text-center bg-green-600 hover:bg-green-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
<a href="/kontakt/" class="block text-center bg-green-600 hover:bg-green-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Otevřít
</a>
</div>
@@ -72,7 +72,7 @@
</div>
<h2 class="text-xl font-bold text-gray-800 mb-2">Objednávka obědů</h2>
<p class="text-gray-600 mb-4">Portál pro objednávku a přehled firemních obědů</p>
<a href="http://ppc-app/pwkweb2" class="block text-center bg-green-600 hover:bg-green-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
<a href="http://ppc-app/pwkweb2/" class="block text-center bg-green-600 hover:bg-green-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
Otevřít aplikaci
</a>
</div>
+9 -1
View File
@@ -7,6 +7,8 @@ import (
"io"
"log"
"net/http"
"net/http/httputil"
"net/url"
"os"
"os/exec"
"strings"
@@ -37,6 +39,12 @@ type GeoCoords struct {
func main() {
log.SetFlags(log.LstdFlags | log.Lshortfile)
// Set up reverse proxy to kontakt service
kontaktURL, _ := url.Parse("http://localhost:8081")
kontaktProxy := httputil.NewSingleHostReverseProxy(kontaktURL)
http.Handle("/kontakt/", http.StripPrefix("/kontakt", kontaktProxy))
http.HandleFunc("/submit", enableCORS(handleSubmit))
http.HandleFunc("/health", enableCORS(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
@@ -60,7 +68,7 @@ func main() {
log.Printf("Error running make dev: %v", err)
}
http.ServeFile(w, r, "kontakt/index.html")
http.Redirect(w, r, "/kontakt/", http.StatusFound)
}))
port := os.Getenv("PORT")