Back to Snowpack

SSL Certificates

examples/https-ssl-certificates/README.md

3.8.51016 B
Original Source
npm start -- --secure

Snowpack provides an easy way to use a local HTTPS server during development through the use of the --secure flag.

When enabled, Snowpack will create an HTTPS server with HTTP2 support enabled using either:

  • (default) the snowpack.key and snowpack.crt file in the root directory of your site
  • (if provided) the TLS certificate and private key files at the paths specified in devOptions.secure.cert and devOptions.secure.key in the Snowpack configuration.

Generating SSL Certificates

You can automatically generate credentials for your project via either:

In most situations you should add personally generated certificate files (snowpack.key and snowpack.crt) to your .gitignore file.