Serve Fresh over HTTPS locally
How can I serve Fresh over HTTPS locally? In node I might generate certs and do
What would the equivalent be for Fresh?
Thanks in advance!
3 Replies
In case anyone else runs into this, my workaround was to update my
main.ts
file to conditionally call serveTls
like so
To make your own certificates for localhost, these instructions work nicely: https://letsencrypt.org/docs/certificates-for-localhost/
Certificates for localhost
Sometimes people want to get a certificate for the hostname “localhost”, either for use in local development, or for distribution with a native application that needs to communicate with a web application. Let’s Encrypt can’t provide certificates for “localhost” because nobody uniquely owns it, and it’s not rooted in a top level domain like “.co...
I highly recommend mkcert as the easiest way to create certs for localhost... https://github.com/FiloSottile/mkcert
GitHub
GitHub - FiloSottile/mkcert: A simple zero-config tool to make loca...
A simple zero-config tool to make locally trusted development certificates with any names you'd like. - GitHub - FiloSottile/mkcert: A simple zero-config tool to make locally trusted develo...