Sub AppStart (Args() As String)
srvr.Initialize("srvr")
'srvr.AddFilter("/*", "AuthFilter", False)
srvr.AddHandler("/getinfo", "InfoHandler", False)
' srvr.Port = "4000"
ConfigureSSL(4000)
srvr.Start
StartMessageLoop
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Private Sub ConfigureSSL (SslPort As Int)
'example of SSL connector configuration
Dim ssl As SslConfiguration
ssl.Initialize
ssl.SetKeyStorePath(File.DirApp, "root.jks") 'path to keystore file
ssl.KeyStorePassword = "xxxx"
ssl.KeyManagerPassword = "xxxx"
srvr.SetSslConfiguration(ssl, SslPort)
'add filter to redirect all traffic from http to https (optional)
'srvr.AddFilter("/*", "HttpsFilter", False)
End Sub