0

I have created a vue cli 3 project. To run it, I call 'npm run serve'. This is an alias in package.json to "vue-cli-service serve".

Where do I inject code to make the site use HTTPS? I see tons of code showing 'how' to do it (Ex How to create an HTTPS server in Node.js?), but I am not understanding WHERE to put that code and how to call it when I run 'npm run serve'

ekjcfn3902039
  • 1,471
  • 1
  • 19
  • 43

1 Answers1

1

Put vue.config.js beside package.json in your project directory

module.exports = {
  devServer: {
    https: true
  }
}

Vue-Cli uses the webpack dev server which has the https option.

Marvin Irwin
  • 869
  • 5
  • 15