1
2
3 Dim httpd
4
5
6
7 Shell.Service.RunService "NBWeb", "NetBox Web Server", "NetBox Http Server Sample"
8
9 '---------------------- Service Event ---------------------
10
11 Sub OnServiceStart()
12
13 Set httpd = NetBox.CreateObject("NetBox.HttpServer")
14
15 If httpd.Create("", 800) = 0 Then
16
17 Set host = httpd.AddHost("", "\wwwroot")
18
19 host.EnableScript = true
20
21 host.AddDefault "index.html"
22
23 httpd.Start
24
25 else
26
27 Shell.Quit 0
28
29 end if
2
3 Dim httpd
4
5
6
7 Shell.Service.RunService "NBWeb", "NetBox Web Server", "NetBox Http Server Sample"
8
9 '---------------------- Service Event ---------------------
10
11 Sub OnServiceStart()
12
13 Set httpd = NetBox.CreateObject("NetBox.HttpServer")
14
15 If httpd.Create("", 800) = 0 Then
16
17 Set host = httpd.AddHost("", "\wwwroot")
18
19 host.EnableScript = true
20
21 host.AddDefault "index.html"
22
23 httpd.Start
24
25 else
26
27 Shell.Quit 0
28
29 end if