Upgrade go-nitro and add support for remote Nitro node #258
13
cmd/serve.go
13
cmd/serve.go
@ -113,12 +113,15 @@ func serve() {
|
||||
|
||||
// TODO: Read from config file
|
||||
rpcPort := 4005
|
||||
tlsCertFilepath := "./nitroTLS/statechannels.org.pem"
|
||||
tlsKeyFilepath := "./nitroTLS/statechannels.org_key.pem"
|
||||
tlsCertFilepath := ""
|
||||
tlsKeyFilepath := ""
|
||||
|
||||
cert, err := tls.LoadX509KeyPair(tlsCertFilepath, tlsKeyFilepath)
|
||||
if err != nil {
|
||||
logWithCommand.Fatal(err)
|
||||
var cert tls.Certificate
|
||||
if tlsCertFilepath != "" && tlsKeyFilepath != "" {
|
||||
cert, err = tls.LoadX509KeyPair(tlsCertFilepath, tlsKeyFilepath)
|
||||
if err != nil {
|
||||
logWithCommand.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
nitroRpcServer, err := initNitroRpcServer(nitroNode, pm, &cert, rpcPort)
|
||||
|
Loading…
Reference in New Issue
Block a user