Hello World Explainer
This little example app gets a message and last-seen time from the web agent it is loaded into.
Prerequisites
- Install the app on your agent.
- View on Github in another tab.
How It Works
The helloWorld.html file defines both the front-end and back-end for the app. Normally of course, an HTML file defines a front-end alone.
To do this, the HTML markup has just one extra thing:
<link rel='webdaemon' href='helloWorld.yml'>
This element is used by the Dæmon just once - when the app is installed. It locates the YAML file that defines the back-end.
Files
The source files in this example are fully annotated, read them carefully to see how it fits together:
helloWorld.html
- This is the app source file, everything hangs off it.
helloWorld.css
- Simple stylesheet for the frontend.
helloWorld.yml
- YAML file ties the frontend to the backend including authorization and static configuration.
helloWorld.js
- Browser-side Javascript makes the request on the backend and displays the result.
helloWorld.ts
- Dæmon-side Typescript handles the request and serves the response.