Asked for an HTTPS one liner on stackoverflow a while back and got this answer:
ruby -r webrick/https -e '
WEBrick::HTTPServer.new(
Port: 8000, DocumentRoot: ".",
SSLEnable: true, SSLCertName: [%w[CN localhost]]).start'
https://stackoverflow.com/a/37986354/59325