Retab
This commit is contained in:
30
main.go
30
main.go
@@ -3,12 +3,12 @@ package main
|
||||
import (
|
||||
"os"
|
||||
"flag"
|
||||
"net/http"
|
||||
"net/http"
|
||||
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"code.severnaya.net/kordophone-mock/v2/web"
|
||||
"code.severnaya.net/kordophone-mock/v2/web"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -24,23 +24,23 @@ func main() {
|
||||
zerolog.SetGlobalLevel(zerolog.DebugLevel)
|
||||
}
|
||||
|
||||
log.Info().Msg("Initializing")
|
||||
log.Info().Msg("Initializing")
|
||||
|
||||
c := web.MockHTTPServerConfiguration{
|
||||
AuthEnabled: false,
|
||||
}
|
||||
c := web.MockHTTPServerConfiguration{
|
||||
AuthEnabled: false,
|
||||
}
|
||||
|
||||
addr := ":5738"
|
||||
s := web.NewMockHTTPServer(c)
|
||||
httpServer := &http.Server{
|
||||
Addr: addr,
|
||||
Handler: s,
|
||||
}
|
||||
s := web.NewMockHTTPServer(c)
|
||||
httpServer := &http.Server{
|
||||
Addr: addr,
|
||||
Handler: s,
|
||||
}
|
||||
|
||||
// Populate with test data
|
||||
s.Server.PopulateWithTestData()
|
||||
log.Info().Msgf("Generated test data. %d conversations", len(s.Server.Conversations()))
|
||||
// Populate with test data
|
||||
s.Server.PopulateWithTestData()
|
||||
log.Info().Msgf("Generated test data. %d conversations", len(s.Server.Conversations()))
|
||||
|
||||
log.Info().Msgf("Listening on %s", addr)
|
||||
log.Fatal().Err(httpServer.ListenAndServe())
|
||||
log.Fatal().Err(httpServer.ListenAndServe())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user