hg-serve

starts a built-in HTTP server for the repository

TLDR

Start HTTP server
$ hg serve
Specify port
$ hg serve -p [8080]
Specify address
$ hg serve -a [0.0.0.0]
Allow push
$ hg serve --config web.push_ssl=false --config web.allow_push=*
Run in background
$ hg serve -d

SYNOPSIS

hg serve [options]

DESCRIPTION

hg serve starts a built-in HTTP server for the repository. It provides read access via web browser and clone/pull access for other clients.The server is convenient for quick sharing but not for production. It supports multiple repositories with configuration.

PARAMETERS

-p, --port PORT

Listen port (default 8000).
-a, --address ADDR
Listen address.
-d, --daemon
Run in background.
--pid-file FILE
PID file location.
-n, --name NAME
Repository name.
--web-conf FILE
Web config file.
-A, --accesslog FILE
Name of access log file to write to.
-E, --errorlog FILE
Name of error log file to write to.
--certificate FILE
SSL certificate file, to serve over HTTPS.
--print-url
Start the server and print only its URL.
--help
Display help information.

CAVEATS

Not production-ready. Push disabled by default. Single-threaded.

HISTORY

Serve is a Mercurial built-in feature for quick repository sharing since version 1.0.

SEE ALSO

hg(1), hg-clone(1), hg-pull(1)