How to connect to lcalhost from your smartphone and use the app under development

When developing a web service, I think there are many times when you want to try out the usability on your smartphone.

However, it's annoying to deploy one by one to the production environment just to see the slight differences.

If it's only once, but if you want to experiment with small changes in detail, it's hell to deploy each time because of the difference of a few lines.

In such a case, you can be happy if you can easily connect to localhost from your smartphone.

manner

The procedure is as follows.

  1. Use the same network line on your smartphone and PC
  2. Find out the IP address of your PC
  3. Launch the server of the app under development
  4. On your smartphone, enter "PC IP address: App port number".

In my case, I'm developing with Rails, so I connect to the general port 3000.

192.160.10.224:3000

It is an image of typing a character string like this into the chrome address bar of a smartphone.

reference

https://qiita.com/TeppeiMimachi/items/8f19e111cd1766a7d084

Recommended Posts

How to connect to lcalhost from your smartphone and use the app under development
How to check the WEB application created in the PC development environment on your smartphone
How to transition from the [Swift5] app to the iPhone settings screen
Android app to select and display images from the gallery
Learn how to customize the Navigation Bar from the sample app
How to use the link_to method
How to use StringBurrer and Arrays.toString.
How to use the include? method
How to use the form_with method
How to use EventBus3 and ThreadMode
How to use the wrapper class
How to use equality and equality (how to use equals)
How to connect Heroku and Sequel
[Java] How to convert from String to Path type and get the path
How to use OrientJS and OrientDB together
[Java] How to use the File class
[Java] How to use the hasNext function
[Java] How to use the HashMap class
[Rails] How to use the map method
[Swift] How to connect TabBar with Storyboard Reference and also use NavigationController
[Java] How to use the toString () method
Studying how to use the constructor (java)
[Processing × Java] How to use the loop
How to set up and use kapt
[Ruby] How to use is_a? Differences from kind_of? and instance_of ?. How to check the type and return a boolean value.
[Flutter] How to use C / C ++ from Dart?
[Processing × Java] How to use the class
How to find the tens and ones
[Processing × Java] How to use the function
How to use substring and substr methods
[Java] How to use the Calendar class
How to use @Builder and @NoArgsConstructor together
How to create your own annotation in Java and get the value
[Ruby] Learn how to use odd? Even? And count the even and odd numbers in the array!
[swift5] How to transition from the app to an external site by specifying the URL
Thinking about how to use Ionic-Native, Hybrid and HTML5 for mobile app production
[Ruby] How to convert from lowercase to uppercase and from uppercase to lowercase
How to use the camera module OV7725 (ESP32-WROVER-B)
[Java] How to use FileReader class and BufferedReader class
[Java] How to use Thread.sleep to pause the program
[Ruby] How to use gsub method and sub method
How to add sound in the app (swift)
[Swift] How to link the app with Firebase
Output of how to use the slice method
How to use Segmented Control and points to note
How to use the replace () method (Java Silver)
How to use scope and pass processing (Jakarta)
How to find the total score and average score
Clone and duplicate the app from GitHub (initialization)
[Ruby basics] How to use the slice method
[Java] How to use Calendar class and Date class
Do you really understand? How to check the library and license used by the app
[Rough explanation] How to separate the operation of the production environment and the development environment with Rails
[Swift] How to play songs from your music library
How to run the SpringBoot app as a service
How to write Scala from the perspective of Java
[Java] How to extract the file name from the path
[Rails] I don't know how to use the model ...
How to connect to ClearDB from Sequel Pro on Heroku
[Beginner] Discover the N + 1 problem! How to use Bullet
How to determine the look-ahead request (Prefetch) from the browser