first working build

This commit is contained in:
6543 2022-08-28 16:26:38 +02:00
parent 51ca74fc11
commit 460c0a2db4
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE
2 changed files with 157 additions and 2 deletions

View file

@ -8,6 +8,7 @@ import (
"errors"
"fmt"
"net"
"net/http"
"os"
"strings"
"time"
@ -136,7 +137,7 @@ func Serve(ctx *cli.Context) error {
if enableHTTPServer {
go func() {
log.Info().Msg("Start HTTP server listening on :80")
err := httpServer.ListenAndServe("[::]:80")
err := http.ListenAndServe("[::]:80", httpServer)
if err != nil {
log.Panic().Err(err).Msg("Couldn't start HTTP fastServer")
}
@ -145,7 +146,7 @@ func Serve(ctx *cli.Context) error {
// Start the web fastServer
log.Info().Msgf("Start listening on %s", listener.Addr())
err = fastServer.Serve(listener)
http.Serve(listener, fastServer)
if err != nil {
log.Panic().Err(err).Msg("Couldn't start fastServer")
}