mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-25 06:16:58 +00:00
first working build
This commit is contained in:
parent
51ca74fc11
commit
460c0a2db4
2 changed files with 157 additions and 2 deletions
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue