Lesson
Setting Up ngrok in Under 2 Minutes to View an App's Local Dev Server from a Mobile Device
Browser's such as Chrome and Firefox provides users with the ability to emulate an applications running on a mobile device, however, anyone who has ever developed a responsive web application will admit that there have been in situations where these tools...
- Duration
- 2 min
- Access
- Pro
- Transcript
- Available
Browser's such as Chrome and Firefox provides users with the ability to emulate an applications running on a mobile device, however, anyone who has ever developed a responsive web application will admit that there have been in situations where these tools have failed them. Additionally, a browser-based emulater don't allow you to see how a user interface will behave when a user is scrolling though an application, interacting with forms, clicking buttons, etc.
Ngrok is a tool for setting up secure introspectable tunnels that allow users to view an web application on a URL that is different from the one it is running on. In this lesson, we'll learn how to get started with ngrok and get a first-hand look at it's ability to provide us with alternative URLs for viewing a local development server. Once ngok's connections are live, an application can be viewed by anyone who has access to the URLs ngrok provides. In turn, we can use these connections to view our application's development server on mobile devices, and get true understanding of how an user interface will appear when viewed through the different browsers that a mobile device is equpped with.
Links
Sample ngrok command set up
# once ngrok is dowloaded, you should put it in a directory such as ~/.ngrok
mv ~/Downloads/ngrok ~/.ngrok
# once moved, set up an alias to ngrok. This should be placed wihin your shell profile
alias ngrok=~/.ngrok
# Execute ngrok and have fun! Below tunnels a connection from localhost:3000
ngrok http 3000