29 lines
486 B
Go
29 lines
486 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"net/http"
|
|
|
|
"code.severnaya.net/kordophone-mock/v2/web"
|
|
)
|
|
|
|
func main() {
|
|
log.Println("Initializing")
|
|
|
|
c := web.MockHTTPServerConfiguration{
|
|
AuthEnabled: false,
|
|
}
|
|
|
|
s := web.NewMockHTTPServer(c)
|
|
httpServer := &http.Server{
|
|
Addr: ":5738",
|
|
Handler: s,
|
|
}
|
|
|
|
// Populate with test data
|
|
s.Server.PopulateWithTestData()
|
|
log.Printf("Generated test data. %d conversations", len(s.Server.Conversations()))
|
|
|
|
log.Fatal(httpServer.ListenAndServe())
|
|
}
|