HG(SERVE)

πŸ’– HG(SERVE) β€” the hg serve glow-up πŸ’–

okay bestie, sit down, hydrate, and let me tell you about hg serve from the HG(SERVE) manual. this is the one where your repo gets its own lil website and everybody can come look at it. main character energy fr fr ✨


🌸 SYNOPSIS 🌸

hg serve [OPTION]...

that's it. that's the whole vibe. throw some options at it and watch it cook πŸ”₯


πŸ¦‹ DESCRIPTION πŸ¦‹

so basically: this starts a local HTTP repository browser and pull server. you can use it for ad-hoc sharing and browsing of repositories β€” like, "hey bestie look at my commits real quick" energy. it is recommended to use a real web server to serve a repository for longer periods of time, though. this is a situationship, not a marriage πŸ’…

⚠️ please note that the server does not implement access control. this means that, by default, anybody can read from the server and nobody can write to it by default. if you set the web.allow-push option to *, that allows everybody to push to the server. you should use a real web server if you need to authenticate users β€” no cap, that part is not a joke.

by default, the server logs accesses to stdout and errors to stderr. use the -A/--accesslog and -E/--errorlog options to log to files instead πŸ“

want the server to pick a free port number to listen on for you? just specify a port number of 0 β€” in this case, the server will print the port number it uses. iconic, honestly πŸŽ€

Returns 0 on success. (we love a clean exit 🫢)


✨ OPTIONS ✨

  • -A, --accesslog <FILE> β€” name of access log file to write to. every hit gets written down, like a group chat receipts folder πŸ“
  • -d, --daemon β€” run server in background. it's gonna go do its own thing, ghosting your terminal πŸ’€
  • --daemon-postexec <VALUE[+]> β€” used internally by daemon mode. don't touch, it's dev business πŸ™ˆ
  • -E, --errorlog <FILE> β€” name of error log file to write to. all the messy bits go here 😭
  • -p, --port <PORT> β€” port to listen on (default: 8000) πŸšͺ
  • -a, --address <ADDR> β€” address to listen on (default: all interfaces) 🌐
  • --prefix <PREFIX> β€” prefix path to serve from (default: server root) πŸͺ„
  • -n, --name <NAME> β€” name to show in web pages (default: working directory). this is your server's display name, its little nameplate πŸ’–
  • --web-conf <FILE> β€” name of the hgweb config file (see 'hg help hgweb') ⭐
  • --webdir-conf <FILE> β€” name of the hgweb config file (DEPRECATED) β€” it's giving "we don't do that anymore", use the other one bestie 🚫
  • --pid-file <FILE> β€” name of file to write process ID to. so you can find your server later, iykyk πŸ‘€
  • --stdio β€” for remote clients (ADVANCED) 🧚
  • --cmdserver <MODE> β€” for remote clients (ADVANCED) 🧚
  • -t, --templates <TEMPLATE> β€” web templates to use 🎨
  • --style <STYLE> β€” template style to use πŸ’…
  • -6, --ipv6 β€” use IPv6 instead of IPv4 🌈
  • --certificate <FILE> β€” SSL certificate file πŸ”’
  • --print-url β€” start and print only the URL πŸ–¨οΈ
  • -S, --subrepos β€” recurse into subrepositories πŸͺ†
[+] marked option can be specified multiple times.

and that's the whole page, bestie. go start a server, share your repo, be the main character of your own localhost πŸ‘‘

this has been the HG(SERVE) manual page, HG(SERVE) edition β€” that's the manual name right there in the title, and the footer signs off with HG(SERVE) too. no version number, no date, just the name, twice, like a lil echo. bye pookie πŸ’œ