Sly-Little-Fox 6 months ago
parent c44fa0d6b2
commit a4df732c23

@ -9,6 +9,7 @@ require (
github.com/go-enry/go-enry/v2 v2.8.2
github.com/gofiber/fiber/v2 v2.35.0
github.com/jenggo/fiberlog v0.2.7
github.com/mattn/go-isatty v0.0.14
github.com/philippgille/gokv/badgerdb v0.6.0
github.com/philippgille/gokv/encoding v0.0.0-20191011213304-eb77f15b9c61
github.com/rs/zerolog v1.27.0
@ -30,7 +31,6 @@ require (
github.com/klauspost/compress v1.15.6 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/philippgille/gokv v0.6.0 // indirect
github.com/philippgille/gokv/util v0.0.0-20191011213304-eb77f15b9c61 // indirect
github.com/pkg/errors v0.9.1 // indirect
@ -40,6 +40,6 @@ require (
github.com/valyala/tcplisten v1.0.0 // indirect
golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/sys v0.0.0-20220721230656-c6bc011c0c49 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

@ -146,6 +146,8 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220721230656-c6bc011c0c49 h1:TMjZDarEwf621XDryfitp/8awEhiZNiwgphKlTMGRIg=
golang.org/x/sys v0.0.0-20220721230656-c6bc011c0c49/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

@ -20,6 +20,7 @@ import (
"github.com/philippgille/gokv/badgerdb"
"github.com/philippgille/gokv/encoding"
"github.com/rs/zerolog"
"github.com/mattn/go-isatty"
"github.com/rs/zerolog/log"
"github.com/xlab/closer"
"golang.org/x/crypto/chacha20poly1305"
@ -99,7 +100,9 @@ func or[T any](values ...T) T {
}
func main() {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
if isatty.IsTerminal(os.Stdout.Fd()) || isatty.IsCygwinTerminal(os.Stdout.Fd()) {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
}
var MAX_DOCUMENT_SIZE = 1024 * 1024 * 1024
var ADMIN_KEY = ""
var MASTER_KEY = ""
@ -384,7 +387,7 @@ func main() {
})
})
err = app.Listen("localhost:1323")
err = app.Listen(":1323")
if err != nil {
log.Panic().Err(err).Msg("Failed to start the Fiber server!")
}

Loading…
Cancel
Save