If you would prefer to listen to TLS directly, or don't want to use Docker, a great alternative is mkcert: https://github.com/FiloSottile/mkcert
It automates creating a self-signed certificate and having it trusted in your local cert stores. I've always missed something when doing it by hand, so it's a great automation tool.