I use this technique to run a real world developer setup and find SSL trust issues early. I much prefer this to running URLs such as http://localhost:3000 and then running into deployment problems.
This method is not usually suitable for wider distribution to people such as to testers, but can be shared between developers in a team, who all follow the same setup steps.
OVERVIEW
Base the setup on a public key infrastructure:
- Create a Root Certification Authority
- Define the URLs and domains for which you want TLS to work
- Add domains to the hosts file on a Developer PC
- Use the root cert to issue one or more wildcard certs for these domains
- Configure SSL trust for the root authority in various technology stacks
RESOURCES
See these resources of mine for further details on some development techniques. Again, I would only recommend this for local development environments and not for deployed environments.