Storyblok Raises $80M Series C - Read News

What’s the True Total Price of Enterprise CMS? Find out here.

Skip to main content

Setting Up HTTPS on localhost in Nuxt 3

During development, apps are usually served via HTTP. However, Storyblok v2 requires your app to be served via HTTPS. Please follow the steps below to enable this in a Nuxt 3 project.

  • Install mkcert on your system The installation instructions for macOS, Windows and Linux can be found in the mkcert Github repository.
  • Create a valid certificate by running the following command in your project folder:
mkcert localhost
  • In the project's package.json, change the nuxt dev command to the following:
NODE_TLS_REJECT_UNAUTHORIZED=0 nuxt dev --https --ssl-cert localhost.pem --ssl-key localhost-key.pem