Developing Electron Apps

Misc

Opening Your Dev Server to the Public

At some point you may want to show someone else the project you’ve been working on. Fortunately, there is a simple CLI tool to accomplish this. Ngrok creates a tunnel to your dev server and (by default) generates a hexadecimal internet address on the ngrok server to offer to your clients or anyone special you’d like to show your work to.

IMPORTANTOpening a dev server to the public constitutes security risks. Be absolutely cautious when using tools like this. This tip is not intended for the general public.

When you’ve finished with your demonstration or testing, make sure to stop ngrok. This will prevent any unwanted access of your computer through ngrok.

Getting started

Download and install ngrok here.(Please note that the ngrok executable file does not need to be placed in or run from inside your cordova folder. When on a mac it’s best to place the ngrok executable file inside /usr/local/bin to be able to run it globally.)

Start your Dev server

$ quasar dev

Create your ngrok connection

$ ngrok http 8080# In case your development server doesn't run on port 8080 you need to change the number to the correct port