Skip to content

Commit fa4ba4b

Browse files
authored
Add files via upload
1 parent 25b1742 commit fa4ba4b

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

Web API/$APPNAME$.b4j

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
AppType=StandardJava
22
Build1=Default,b4j.webapi
3-
File1=index.html
4-
File2=main.html
3+
File1=help.html
4+
File2=index.html
5+
File3=main.html
56
FileGroup1=Default Group
67
FileGroup2=Default Group
8+
FileGroup3=Default Group
79
Group=Default Group
810
Library1=byteconverter
911
Library2=jcore
@@ -14,19 +16,20 @@ Library6=javaobject
1416
Module1=CorsFilter
1517
Module2=DataUtils
1618
Module3=DefaultHandler
17-
Module4=HomeHandler
18-
Module5=HttpsFilter
19-
Module6=ProductHandler
20-
Module7=Utility
21-
Module8=WebUtils
22-
NumberOfFiles=2
19+
Module4=HelpHandler
20+
Module5=HomeHandler
21+
Module6=HttpsFilter
22+
Module7=ProductHandler
23+
Module8=Utility
24+
Module9=WebUtils
25+
NumberOfFiles=3
2326
NumberOfLibraries=6
24-
NumberOfModules=8
27+
NumberOfModules=9
2528
Version=9.1
2629
@EndOfDesignText@
2730
' Name: Web API Lite
2831
' Description: Non-UI application (console / server application)
29-
' Version: 1.09
32+
' Version: 1.10
3033

3134
#Region Project Attributes
3235
#CommandLineArgs:
@@ -41,7 +44,7 @@ Version=9.1
4144
#End Region
4245

4346
Sub Process_Globals
44-
Public const VERSION As Float = 1.09
47+
Public const VERSION As String = "1.10"
4548
Public srvr As Server
4649
Public ROOT_PATH As String
4750
Public ROOT_URL As String
@@ -126,17 +129,21 @@ Sub AppStart (Args() As String)
126129
srvr.AddHandler("", "HomeHandler", False)
127130

128131
' Add more handlers here
129-
'srvr.AddHandler(ROOT_PATH & "default/*", "DefaultHandler", False)
132+
'srvr.AddHandler(ROOT_PATH & "topic/*", "DefaultHandler", False)
130133
srvr.AddHandler(ROOT_PATH & "category/*", "ProductHandler", False)
134+
srvr.AddHandler(ROOT_PATH & "help/*", "HelpHandler", False)
131135

132136
' Add CrossOriginFilter
133-
'ConfigureCORS("/*", "*", "*", "*")
134-
ConfigureCORS(ROOT_PATH & "category/*", "*", "", "")
137+
ConfigureCORS("/*", "*", "*", "*")
138+
'ConfigureCORS(ROOT_PATH & "topic/*", "*", "", "")
139+
'ConfigureCORS(ROOT_PATH & "category/*", "*", "", "")
140+
'ConfigureCORS(ROOT_PATH & "help/*", "*", "", "")
135141

136142
' Server starts
137143
srvr.Start
138144

139-
Log($"Web API server (version = $1.2{VERSION}) is running on port ${srvr.Port}"$)
145+
'Log($"Web API server (version = $1.2{VERSION}) is running on port ${srvr.Port}"$)
146+
Log($"Web API server (version = ${VERSION}) is running on port ${srvr.Port}"$)
140147
Log($"Open the following URL from your web browser"$)
141148
Log(ROOT_URL & ROOT_PATH)
142149
' Open a web browser and navigate to: http://127.0.0.1:19800/v1/
@@ -150,7 +157,7 @@ Public Sub OpenConnection (pool As ConnectionPool) As ConnectionPool
150157
Dim jo As JavaObject = pool
151158
jo.RunMethod("setMaxPoolSize", Array(Conn.MaxPoolSize))
152159
Catch
153-
LogDebug(LastException)
160+
LogError(LastException)
154161
End Try
155162
Return pool
156163
End Sub

0 commit comments

Comments
 (0)