nuxt https 적용
Opened this issue · 2 comments
shldhee commented
You can use mkcert
- Install mkcert:
brew install mkcert
brew install nss # if you use Firefox
- Add mkcert to your local root CAs:
mkcert -install
- In your terminal, navigate to your site's root directory or whichever directory you'd like the certificates to be located at. And run:
mkcert localhost
- Add the following to your nuxt.config.js:
server: {
https: {
key: fs.readFileSync(path.resolve(__dirname, 'localhost-key.pem')),
cert: fs.readFileSync(path.resolve(__dirname, 'localhost.pem'))
}
}