fx serve

start the update server and attach to a running fuchsia device

usage: fx serve [-v] [-l host[:port]] [-c version] [--no-auto-config] [--name NAME]

  -l host:port       host and port that "pm serve" will listen on
  -c version         configuration format version for the served config.json
                     that "pm" will serve. Valid choices: 1 or 2.
                     Choosing `1` will serve a file which can be processed by
                     `pkgctl repo add ... -f 1`.
                     Choosing `2` will serve a file which can be processed by
                     `pkgctl repo ...` without the `-f 1` switch.
  --no-auto-config   do not configure this host as a package server on the device
  --name NAME        Name the generated update source config NAME.
  --[no-]persist     enable or disable persistence of repository metadata. Disabled
                     by default.
  -v                 verbose mode, shows info and debug messages from "pm" and "ffx repository serve"
  -C|--clean         clean the package repository first. This flag is only
                     valid if the incremental package publishing is enabled.

This command supports:
 - incremental package publishing. If enabled, it will auto-publish packages as they
   are created or modified.
 - foreground repository serving. If enabled, the repository server and device registration
   flows will be ran as a foreground process.

To enable incremental package serving, run "fx --enable=incremental serve ..."
To enable foreground repository serving, run "fx --enable=foreground_repo_server serve ..."

serve source code