Skip to content

Commit

Permalink
chore: use environment variables for server port
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzSwirlz committed Jan 18, 2025
1 parent 79e33f5 commit fc83f1a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion database/connect_mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func connectMongo() {
mongoContext, _ = context.WithTimeout(context.Background(), 10*time.Second)
_ = mongoClient.Connect(mongoContext)

accountDatabase = mongoClient.Database("pretendo_account")
accountDatabase = mongoClient.Database(os.Getenv("PN_WIIU_CHAT_MONGO_DATABASE")
pnidCollection = accountDatabase.Collection("pnids")
nexAccountsCollection = accountDatabase.Collection("nexaccounts")

Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ go 1.21

toolchain go1.22.4

replace github.com/PretendoNetwork/nex-protocols-common-go => ./nex-protocols-common-go

require (
github.com/PretendoNetwork/grpc-go v1.0.1
github.com/PretendoNetwork/nex-go/v2 v2.0.5
Expand Down
2 changes: 1 addition & 1 deletion nex/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ func StartNEXServer() {
registerCommonProtocols()
registerNEXProtocols()

globals.SecureServer.Listen(60005)
globals.NEXServer.Listen(":" + os.Getenv("PN_WIIU_CHAT_SECURE_SERVER_PORT"))
}

0 comments on commit fc83f1a

Please sign in to comment.