I'm want to deploy my Sveltekit app on HTTPS server. I have key files also. This is my svelte.config.js file
import preprocess from 'svelte-preprocess';import node from '@sveltejs/adapter-node';import fs from 'fs';import https from 'https';/** @type {import('@sveltejs/kit').Config} **/const config = { // Consult https://github.com/sveltejs/svelte-preprocess // for more information about preprocessors preprocess: preprocess(), kit: { // hydrate the <div id="svelte"> element in src/app.html target: '#svelte', adapter: node(), files: { assets: "static" }, vite: { server: { https: { key: fs.readFileSync("path\\privkey.pem"), cert: fs.readFileSync("path\\cert.pem"), }, }, } }};export default config;
where should I keep my key files for reading from the config file? I tried a few and got some errors screenshot is attached.
Someone please guide me. Thanks in advance.