Skip to content

Add -serve flag to serve the generated HTML over LAN #4

Description

@aplgr

Goal

Add a -serve flag that starts a tiny static file server so the generated HTML can be opened from other devices in the LAN.

Proposed behavior

  • grovegrid -in data.csv -out out.html -serve generates as usual, then serves the output directory.
  • Print URLs like:
    • http://localhost:PORT/
    • http://<LAN-IP>:PORT/

Flags

  • -serve (bool)
  • -host (default 0.0.0.0 so phones in LAN can reach it)
  • -port (default 8080, or 0 for random free port)

Acceptance criteria

  • Server is read-only static hosting.
  • Logs one-line “Serving on …”.
  • Ctrl+C cleanly stops.
  • Doesn’t break the non-serve workflow.

Security note

This is intentionally minimal: LAN sharing only, no auth. Document that users should not expose it to the public internet.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clicommand line interfaceenhancementNew feature or requesthelp wantedExtra attention is neededroadmap

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions