You can check How to securely test local/staging HTTPS project for more details about required setup or just follow instructions below.
WARNING: You'll need to run these commands just once, don't run them again if you already did this before for some other project.
MacOS users should first prepare OpenSSL package: