How to make the "ionic serve" deploy on the mobile web start with "https://"?

Hi all,

I want to simply test my ionic react web app on my phone. However, my app use “gps” function from browser, so my smartphone told me, it will only allow the website with a"https://"…

How can I make “ionic serve -???” so that it start with “https://”?

Thanks in advance!

Hi

Try —ssl as flag?

Hi Tommertom,

thanks very much for the suggestion, but I just tried it, but it doesn’t work at all.

I use ionic react 6 and tried this command: ionic serve --ssl, I am really confusing, it also stay on ionic cli documentation: ionic serve: Start a Local Development Server for App Dev/Testing

Or do I miss something in the command?

Cannot tell - not using react. And can’t say that could be a cause either