Skip to content

Instantly share code, notes, and snippets.

@mkdym
Last active July 27, 2023 02:56
Show Gist options
  • Save mkdym/e2df3f657950c13ad0e6e0d9da7ccf90 to your computer and use it in GitHub Desktop.
Save mkdym/e2df3f657950c13ad0e6e0d9da7ccf90 to your computer and use it in GitHub Desktop.
vite server https
import fs from 'fs'
export default defineConfig({
...
server: {
https: {
key: fs.readFileSync('server.key'),
cert: fs.readFileSync('server.cert'),
},
port: 443,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment