All apps/serve

serve

serve

Static file serving and directory listing.

Runs as serve|macOS, Linux, Windows

Command form

ai-draft · 2 tasks · 12 fields

Start a static web server for a folder. TLS passphrase and config file options are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui serve
Serve a folderExample values, fixed in this page — nothing here reaches a terminal
Basic
Folder*
directory
Port
string
Enable CORS
-C
TasksEach one presets the form for one job
Serve a folder
locationportcors
Serve a single-page app
locationportsingle
ParametersOnly these flags are editable in the form
Folder
path · positional 0
Listen address
Port, host/port, unix socket or Windows pipe.
string
-l--listen
Port
string
-p
Single-page app
Rewrite all not-found requests to index.html.
boolean
-s--single
Enable CORS
boolean
-C--cors
No clipboard copy
boolean
-n--no-clipboard
No compression
boolean
-u--no-compression
Resolve symlinks
boolean
-S--symlinks
TLS certificate
path
--ssl-cert
TLS private key
path
--ssl-key
Debug output
boolean
-d--debug
Do not switch port
boolean
--no-port-switching
SourcesEvery flag above is checked against these
fig
completion

github.com

Before it fills your prompt, Otty checks the installed serve against its version. A form that does not match your version is not offered.