Created
March 5, 2019 16:38
-
-
Save mathieutu/dfd6eddee9b08615831c7a19214a6f59 to your computer and use it in GitHub Desktop.
Nuxt v1 https
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { Nuxt } = require('nuxt') | |
| const https = require('https') | |
| const { readFileSync } = require('fs') | |
| const port = 443 | |
| const config = require('./nuxt.config.js') | |
| const nuxt = new Nuxt(config) | |
| const options = { | |
| key: readFileSync('/home/store/certs/store.key'), | |
| cert: readFileSync('/home/store/certs/store.crt') | |
| }; | |
| https | |
| .createServer(options, nuxt.render) | |
| .listen(port) | |
| console.log('Server listening on `localhost:' + port + '`.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment