When running ionic serve on our production server I see this:
Gulp startup tasks: [ 'sass', 'watch' ] Running dev server: http://localhost:8100 Running live reload server: http://localhost:35729 Watching : [ 'www/**/*', '!www/lib/**/*' ] Ionic server commands, enter: restart or r to restart the client app from the root goto or g and a url to have the app navigate to the given url consolelogs or c to enable/disable console log output serverlogs or s to enable/disable server log output quit or q to shutdown the server and exit
Which means I cannot access the app from a browser as its only listening for localhost. How can I change localhost to the actual server IP?
Thanks
Please try this. @luaneswart
ionic serve --address YOUR_IP_ADDRESS
Please note that YOUR_IP_ADDRESS should be an available IP which is assigned to your actual device. For example if your (static or dynamic) IP address is 192.168.0.110, you cannot do âionic serveâ with 192.168.0.111 or 192.168.0.112 etc.
3 Likes
Hi, I got it to work by doing âionic addressâ and then simply choosing the address I wanted 
4 Likes
Awesome, I also learnt a thing or two. 
You can just type ionic help serve
to see what options are available, or ionic help
to see all the commands.
when I use command âionic serve --address 192.168.0.2â, i got errors.
The address only could be changed by command âionic addressâ, and then select a ip from the given list.
However, I canât find the command option âionic addressâ in the help.
I think itâs a tiny bug. 
Thatâs because your device is not assigned with such an IP of 192.168.0.2.
This one is how to chose some_ip/locahost once again. 
Just update you CLI
dev server running: http://localhost:8100/
to make your ip adress to work in VPS
Follow this steps
Install the Ionic CLI
The easiest way to get the Ionic CLI is through npm.
$ npm install -g ionic
Note: For a global install of -g ionic, OSX/Linux users may need to prefix the command with sudo.
Update Ionic lib
Update Ionic library files, which are found in the www/lib/ionic directory. If bower is being used by the project, this command will automatically run bower update ionic, otherwise this command updates the local static files from Ionicâs CDN.
$ ionic lib update