#run on https

3 messages · Page 1 of 1 (latest)

torpid lotus
#

how can i npm run start my application on https://?

mellow perchBOT
#

Hi @torpid lotus. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

To run your Astro application with HTTPS, you'll need to provide your SSL key and certificate. You can pass the path to your key and certificate via the environment variables SERVER_CERT_PATH and SERVER_KEY_PATH. Here's an example of how you might pass them in bash:

SERVER_KEY_PATH=./private/key.pem SERVER_CERT_PATH=./private/cert.pem node ./dist/server/entry.mjs

This example assumes you have your SSL key and certificate files in a private folder. Make sure to replace the paths with the correct paths to your key and certificate files.

Source: Astro Documentation - HTTPS (https://docs.astro.build/en/guides/integrations-guide/node#https)

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: