cue-lang / docs-and-content

A place to discuss, plan, and track documentation on cuelang.org
5 stars 1 forks source link

cuelang.org: tutorial prompts the reader to start a local server on a potentially contended port #177

Open jpluscplusm opened 1 month ago

jpluscplusm commented 1 month ago

What page were you looking at?

https://cuelang.org/docs/tutorial/working-with-a-custom-module-registry/

What version of the site were you looking at?

https://github.com/cue-lang/cuelang.org/commit/b24925a7a768f842de21d148e85cad54a1efeec4

What did you do?

A user reported a problem completing the tutorial because they received an HTTP 403 halfway through the steps.

They posted a debug log that mentioned that AirTunes was the server involved. This led to https://stackoverflow.com/questions/72369320/why-always-something-is-running-at-port-5000-on-my-mac, which suggests that port 5000 isn't a macOS-friendly port for the tutorial to use for the local registry.

Suggestion: update to 5001, after confirming that neither common Linux distros nor macOS have something local that listens on that port by default.

mvdan commented 1 month ago

Or use cue mod registry, which picks a randomly unused port:

$ cue mod registry
listening on 127.0.0.1:39321

Note that this requres the user to fish out the hostname and port from the first line of output though.