blob: 043f685145ae382a0ec2c88bd0016e0ca503fef4 [file] [log] [blame] [view]
# todo (headless)
Example module that uses Ledger to store internal data.
To run the module, run:
```
device_runner --device_shell=dev_device_shell --user_shell=dev_user_shell --user_shell_args=--root_module=example_todo_headless
```
This is a headless module, taking no input and writing the output to stdout.
The module keeps a list of todo items in a Ledger page, randomly adds and
removes items, and prints the state after each modification. Items generated by
each instance are tagged with a unique tag. To observe the application running
on multiple devices and synchronizing the state using Ledger, [set up Cloud
Sync](https://fuchsia.googlesource.com/ledger/+/HEAD/docs/user_guide.md#Setup)
and run the module on each device.
Example output:
```
[00053.199] 02933.02949> --- To Do ---
[00053.199] 02933.02949> [ 18355 ] write a spec for the law of gravity
[00053.199] 02933.02949> [ 24673 ] celebrate hipster bars south of Pigalle
[00053.200] 02933.02949> [ 24673 ] solve the society
[00053.200] 02933.02949> [ 18355 ] draw the pyramids
[00053.200] 02933.02949> [ 24673 ] evaluate a better way forward
```