Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add at-main support to invoke LiveServer from the command line. #179

Merged
merged 1 commit into from
Apr 10, 2024

Commits on Apr 10, 2024

  1. Add at-main support to invoke LiveServer from the command line.

    Julia 1.11 and later have the option to invoke a package's `main`
    function with the `-m` flag, e.g. `julia -m LiveServer <args>...`. This
    patch adds a main function to LiveServer.
    
    Output of `julia -m LiveServer --help`:
    ```
    NAME
           LiveServer.main - run a webserver
    
    SYNOPSIS
           julia -m LiveServer [-h <host>] [-p <port>] [-v] [--help] <directory>
    
    DESCRIPTION
           `LiveServer.main` (typically invoked as `julia -m LiveServer`)
           starts a web server serving the contents of the specified
           filesystem directory using the LiveServer.jl Julia package.
    
    OPTIONS
           <directory>
               Path to the root directory of the server (default: pwd)
           -h <host>
               Specify the host (default: 127.0.0.1)
           -p <port>
               Specify the port (default: 8000)
           -v
               Enable verbose output
           --help
               Show this message
    ```
    fredrikekre committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    94c33c4 View commit details
    Browse the repository at this point in the history