'Non-UI application (console / server application)
#Region Project Attributes
#CommandLineArgs:
#MergeLibraries: True
#End Region
#AdditionalJar: jtds-1.3.1.jar
#AdditionalJar: firebase-server-sdk.jar
Sub Process_Globals
Public srvr As Server
Public rdcConnector1 As RDCConnector
Public const VERSION As Float = 2.1
Type DBCommand (Name As String, Parameters() As Object)
Type DBResult (Tag As Object, Columns As Map, Rows As List)
Private fs As FirebaseServer
End Sub
Sub AppStart (Args() As String)
srvr.Initialize("")
rdcConnector1.Initialize
srvr.Port = rdcConnector1.serverPort
srvr.AddHandler("/test", "TestHandler", False)
srvr.AddHandler("/rdc", "RDCHandler", False)
srvr.Start
Log($"jRDC is running (version = $1.2{VERSION})"$)
fs.Initialize("fs", File.OpenInput(File.DirAssets, "RepairShop-XXXXXXXXXXX.json"))
fs.VerifyToken("XXXXXXXXXXXXXXX")
StartMessageLoop
End Sub
Sub fs_TokenVerified (TokenId As String, Success As Boolean, Token As FirebaseToken)
If Success Then
Log(Token.DisplayName)
Log(Token.Email)
Log(Token.Uid)
Else
Log("Sorry no good!")
End If
End Sub