It not at all difficult to spin up a SvelteKit secure dev server for your app. The SvelteKit command line interface (CLI) will generate a self-signed SSL certificate for you instantly. This lets you access your site via an HTTPS connection as you develop and test it. Although not necessary for many applications, you might be working with something like FIDO U2F multifactor authentication (MFA). In this case it is necessary, even during development, to be running an HTTPS site. Fear not though! This short video takes you through the steps needed to get your HTTPS SvelteKit dev running. You'll be off to the races in no time!
Vite recommend you create your own certificates. You might use
makecert to do this. As a temporary fix, you might consider installing
@vitejs/plugin-basic-ssl Vite plugin:
- Getting Started with SvelteKit,
Cloudflare article on SSL certificates which also explains what a self-signed
SvelteKit command line interface (CLI) docs
If you have found this video useful, see links below for further related content on this site. I do hope you learned one new thing from the video. Let me know if there are any ways I can improve on it. I hope you will use the code or starter in your own projects. Be sure to share your work on Twitter, giving me a mention so I can see what you did. Finally be sure to let me know ideas for other short videos you would like to see. Read on to find ways to get in touch, further below. If you have found this post useful, even though you can only afford even a tiny contribution, please consider supporting me through Buy me a Coffee.
Finally, feel free to share the post on your social media accounts for all your followers who will
find it useful. As well as leaving a comment below, you can get in touch via @askRodney