forked from brightsign/node.js-starter-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode-server.brs
More file actions
executable file
·46 lines (34 loc) · 1.14 KB
/
Copy pathnode-server.brs
File metadata and controls
executable file
·46 lines (34 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Function Node_Initialize(msgPort As Object, userVariables As Object, bsp as Object)
print "=== Node_Initialize - entry"
h = {}
h.version = "1.00.00"
h.msgPort = msgPort
h.userVariables = userVariables
h.bsp = bsp
h.ProcessEvent = Node_ProcessEvent
h.objectName = "Node_object"
nc = CreateObject("roNetworkConfiguration", 0)
nc.SetHostName("brightsign-sfn-server")
nc.Apply()
nodePackage = createObject("roBrightPackage", bsp.assetPoolFiles.getPoolFilePath("node-server.zip"))
CreateDirectory("node-server")
nodePackage.Unpack("node-server/")
wwwPackage = createObject("roBrightPackage", bsp.assetPoolFiles.getPoolFilePath("www.zip"))
CreateDirectory("www")
wwwPackage.Unpack("www/")
url$ = "file:///sd:/node-server/node-server.html"
htmlRect = CreateObject("roRectangle", 0, 0, 1920, 1080)
is = { port: 2999 }
config = {
nodejs_enabled: true
inspector_server: is
brightsign_js_objects_enabled: true
url: url$
}
h.htmlWidget = CreateObject("roHtmlWidget", htmlRect, config)
h.htmlWidget.Show()
return h
End Function
Function Node_ProcessEvent(event As Object) as boolean
return false
End Function