Skip to content

Commit 37b42af

Browse files
committed
info on applets
1 parent 0caf5e2 commit 37b42af

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

docs/applets.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# KDX Applets
2+
3+
KDX provides a miniature framework that enables you to easily create an NWJS window within KDX that has access to KDX configuration.
4+
5+
This is an equivalent to a NodeJs application with a web interface that receives KDX + Kaspa Application Stack configuration on startup.
6+
7+
Applets can be located within the KDX application folder inside `apps` subfolder or symlinked to this location.
8+
Alternatively applets can be configured to run from a custom location via configuration settings.
9+
10+
11+
## Configuration Settings
12+
13+
The following applet configuration settings can should be created inside of KDX module
14+
configuration settings (located in the *Settings tab*) or can be placed inside the `"kdx"`
15+
property of `packaje.json` manifest file if located within the apps folder:
16+
17+
```json
18+
{
19+
"name": "DAGViz",
20+
"location": "http://localhost:8689",
21+
"stop": "http://localhost:8689/stop",
22+
"width": 1600,
23+
"height": 680,
24+
"args": [
25+
"node",
26+
"dagviz",
27+
"--kdx",
28+
"--no-auth",
29+
"--port=8689",
30+
"--kasparov=http://localhost:$KASPAROVD-PORT",
31+
"--mqtt-address=mqtt://localhost:$MQTT-PORT"
32+
]
33+
}
34+
```
35+
36+
The following is a `package.json` sample file:
37+
38+
```json
39+
{
40+
"name" : "my-app",
41+
"version" : "1.2.3",
42+
"kdx" : {
43+
"name" : "My App",
44+
"location" : "http://dagviz.com"
45+
}
46+
}
47+
```
48+
49+
Supported properties:
50+
- `name` - name of the application
51+
- `location` - URL KDX should open
52+
- `stop` *optional* - URL to signal KDX shutdown
53+
- `width` *optional* - Applet window width
54+
- `height` *optional* - Applet window height
55+
- `args` *optional* - array of command line arguments to spawn at KDX startup
56+
- `advanced` *optional* - this option will cause applet to show up only if *Advanced Settings* option is enabled.

0 commit comments

Comments
 (0)