Using mkcert for testing The following package.json script will automatically generate cert and key for the domains that you want - set your server to load the same names and cert setup is now a one-liner.