fix: use port number from env variable

This commit is contained in:
Joshua Peisach 2025-01-26 16:13:19 -05:00
parent 21ee23b809
commit 6b5314b9a8
No known key found for this signature in database
GPG Key ID: 41C3D4189AFEDB5A

View File

@ -2,6 +2,8 @@ package nex
import (
"fmt"
"os"
"strconv"
nex "github.com/PretendoNetwork/nex-go/v2"
_ "github.com/PretendoNetwork/nex-protocols-go/v2"
@ -36,5 +38,7 @@ func StartNEXServer() {
registerCommonProtocols()
registerNEXProtocols()
globals.NEXServer.Listen(":" + os.Getenv("PN_WIIU_CHAT_SECURE_SERVER_PORT"))
port, _ := strconv.Atoi(os.Getenv("PN_WIIU_CHAT_SECURE_SERVER_PORT"))
globals.SecureServer.Listen(port)
}