1

Currently I am working on an Aurelia app that is fully developed. In the dev environment, it is only serving http requests. Anyone could help me with adding https so can I can access the app through https?

Thank you

Angelo

Angelo
  • 35
  • 6
  • Hi, Angelo. This depends on the bundler you are using. Webpack? Alameda? – Cristián Ormazábal Dec 06 '21 at 03:53
  • I am using Webpack – Angelo Dec 06 '21 at 05:43
  • Does this answer your question? [Serving https in aurelia typescript webpack dev setup](https://stackoverflow.com/questions/49687797/serving-https-in-aurelia-typescript-webpack-dev-setup) – Cristián Ormazábal Dec 06 '21 at 13:37
  • Hi Cristian, thanks. I did have a look at it, That solution was back in 2018 and it also talks about them updating Aurelia to fix it. I see run-webpack.ts having that setting (https: config.devServer.https) in folder node_modules\aurelia-cli\lib\resources\tasks and my webpack.config.js has this setting : devServer: { contentBase: outDir, // serve index.html for all 404 (required for push-state) historyApiFallback: true, https: true }, Is there anything else I am missing? thanks – Angelo Dec 06 '21 at 22:40

1 Answers1

1

In the webpack.config.js file, add the https property:

devServer: {
    ... some other values...
    https: true
    ... some other values...
  },

With that, you should run

npm start

And you'll get your app running on https://localhost:8080

Regards.

Cristián Ormazábal
  • 1,457
  • 1
  • 9
  • 18