Jump to content

Workflow for tunnelling your localhost (ngrok)


Recommended Posts

Hi, i usually create a "tunnel" to my localhost with ngrok (ngrok.com) on my terminal to expose my local website to the outside.

I would like to be able do the same with Alfred :)

I just bought the powerpack yesterday so i'm asking some help... 

 

For example, if i write:

ngrok 80 => it will create a tunnel and my app will be available at http://randomdomain.ngrok.com (port 80)

ngrok subdomain myapp 80 => my app will be available on a custom domain http://myapp.ngrok.com (port 80)

 

Thank you

Alberto

Edited by alby
Link to comment

Hi, i usually create a "tunnel" to my localhost with ngrok (ngrok.com) on my terminal to expose my local website to the outside.

I would like to be able do the same with Alfred :)

I just bought the powerpack yesterday so i'm asking some help... 

 

For example, if i write:

ngrok 80 => it will create a tunnel and my app will be available at http://randomdomain.ngrok.com (port 80)

ngrok subdomain myapp 80 => my app will be available on a custom domain http://myapp.ngrok.com (port 80)

 

Thank you

Alberto

 

So are you saying you just want to be able to perform those commands quickly from Alfred? If so, you could make a workflow that has a keyword and a run script item, then in the run script, leave the language set to bash and enter your commands there. These commands are run relative to your workflow directory so if you need to run something from another location you would need to cd to that directory. Alfred also doesn't import your ENV so things like PATH and such aren't there. I say that because, referencing ngrok, you would probably need to launch it with the full path, not just "ngrok <params>"

 

If you need some help setting this up, let me know

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...