lustre-labs / lustre

An Elm-inspired framework for building HTML templates, single page applications, and server-rendered components in Gleam!
https://hexdocs.pm/lustre
MIT License
744 stars 53 forks source link

✨ Add flags for configuring the server's host and port. #33

Closed hayleigh-dot-dev closed 5 months ago

hayleigh-dot-dev commented 5 months ago

Uses glint to parse CLI args for --host and --post as well as the flag --include-styles to add the lustre_ui stylesheet via jsdelivr.

% gleam run -m lustre/try -- --help                                                
  Compiling lustre
   Compiled in 0.18s
    Running lustre/try.main
USAGE:
        gleam run -m lustre/try [ ARGS ] [ --host=<STRING> --include-styles=<BOOL> --port=<INT> ]

FLAGS:
        --help                  Print help information
        --host=<STRING>         The host to run the server on
        --include-styles=<BOOL>         Include lustre_ui's default stylesheet in your app.
        --port=<INT>            The port to run the server on

There are outstanding issues on the glint repo to fix some things or improve the output of this help text:


Closes #26.