StruC PRO said 4 months ago on Tips and Tricks :
Cool! You can make the port attribute optional in zsh by using:

serve() {
  ruby -run -ehttpd -- --port ${1:-3000}
}