Skip to content

Instantly share code, notes, and snippets.

@vbence86
Last active June 15, 2016 15:16
Show Gist options
  • Save vbence86/f723f2ea15bd66ab7cd7429d4ea7e021 to your computer and use it in GitHub Desktop.
Save vbence86/f723f2ea15bd66ab7cd7429d4ea7e021 to your computer and use it in GitHub Desktop.
Test your localhost against mobile devices

How to test your 'localhost' against a mobile device

Link the remote device to your machine

  • Make sure your machine is connected to the Pbx SWK
  • Connect the target device to the Pbx SWK

Get your remote IP address

  • Open a terminal and type the following
ifconfig
  • Fetch you remote IP address that identify your machine on the Wifi network
wlp2s0    Link encap:Ethernet  HWaddr 5c:e0:c5:ac:d5:05  
          inet addr:10.5.26.119  Bcast:10.5.255.255  Mask:255.255.0.0
          inet6 addr: fe80::5ee0:c5ff:feac:d505/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:41115 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1909 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6225164 (6.2 MB)  TX bytes:403443 (403.4 KB)
  • In this example it is 10.5.26.119

Rebuild Eagle-Webapp using the given IP address

  • Replace localhost with the above IP address (10.5.26.119) in aviary-eagle-web/eagle-webapp/env-configuration/localhost.conf
babelEndPoint=https://www.photobox.co.uk/babel
contentServerUrl=http://10.5.26.119:9085/v2
staticHost=http://10.5.26.119/static
babelRESTEndpoint=https://babel-api-0-elb-external.babeltest.photobox.com/v2
  • Rebuild Eagle-webapp
cd aviary-eagle-web
mvn clean install -DskipTests

Start Eagle-webapp

  • Start/restart eagle-webapp
cd eagle-webapp
mvn ninja:run -Dninja.jvmArgs="-Dninja.external.configuration=env-configuration/localhost.conf"

Load the page on the device

http://[your_ip_address]/home 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment