|
|
@ -5,6 +5,7 @@ import (
|
|
|
|
"log"
|
|
|
|
"log"
|
|
|
|
"net"
|
|
|
|
"net"
|
|
|
|
"net/http"
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"os"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/Flashfyre/pokerogue-server/api"
|
|
|
|
"github.com/Flashfyre/pokerogue-server/api"
|
|
|
|
"github.com/Flashfyre/pokerogue-server/db"
|
|
|
|
"github.com/Flashfyre/pokerogue-server/db"
|
|
|
@ -27,6 +28,10 @@ func main() {
|
|
|
|
log.Fatalf("failed to initialize database: %s", err)
|
|
|
|
log.Fatalf("failed to initialize database: %s", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if *network == "unix" {
|
|
|
|
|
|
|
|
os.Remove(*address)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
listener, err := net.Listen(*network, *address)
|
|
|
|
listener, err := net.Listen(*network, *address)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.Fatalf("failed to create net listener: %s", err)
|
|
|
|
log.Fatalf("failed to create net listener: %s", err)
|
|
|
|