Add certificate and https to allow --host (and testing on mobile)

This commit is contained in:
2025-01-08 21:41:34 +01:00
parent e7412f6768
commit 7403515f80
3 changed files with 61 additions and 0 deletions

View File

@@ -1,5 +1,7 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
import vuePlugin from 'rollup-plugin-vue'
import fs from 'node:fs'
import path from 'node:path'
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
@@ -168,5 +170,11 @@ export default defineNuxtConfig({
}
}
}
},
devServer: {
https: {
key: fs.readFileSync(path.resolve(__dirname, 'localhost+1-key.pem')).toString('utf-8'),
cert: fs.readFileSync(path.resolve(__dirname, 'localhost+1.pem')).toString('utf-8'),
}
}
})