Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

ngrok port issue - how do you change port ?

Is any one familiar with ngrok?

I'm trying to set it up, but I keep getting a port issues.

ngrok ; exit; Error: Specify a local port to tunnel to, or an ngrok command.

Example: To expose port 80, run 'ngrok 80' logout

[Process completed]

It doesn't let me change the config. Any ideas? I'd like to set it to 8080.

2 Answers

Not familiar with the tool myself but looking at the help output it gives the following examples:

Examples:
    ngrok 80
    ngrok -subdomain=example 8080
    ngrok -proto=tcp 22
    ngrok -hostname="example.com" -httpauth="user:password" 10.0.0.1

So it looks like maybe you could use -proto=tcp 8080 to achieve what you're looking for?

So ngrok give a public url to test your page through PageSpeed Insights.

It doesn't seem to work?

these were the instructions:

Part 1: Optimize PageSpeed Insights score for index.html

Some useful tips to help you get started:

Check out the repository To inspect the site on your phone, you can run a local server

$> cd /path/to/your-project-folder $> python -m SimpleHTTPServer 8080 Open a browser and visit localhost:8080

Download and install ngrok to make your local server accessible remotely.

$> cd /path/to/your-project-folder $> ngrok 8080 Copy the public URL ngrok gives you and try running it through PageSpeed Insights! Optional: More on integrating ngrok, Grunt and PageSpeed.