I created an application using ionic for the front-end and laravel for the back-end, I wanted to test the app on my smartphone without buying hosts, etc ...
I created the apk (using ionic cap build android), I installed it on the device and obviously the calls to the database do not work ...
searching on the internet I tried to replace localhost:8000 with my-ip-address:8000 but:
- nothing, although if I search from the browser of my smartphone I enter the default view of the laravel project.
- now if I try to start the livereload (ionic serve) on my pc, it gives me error: Failed to load resource: net :: ERR_NAME_NOT_RESOLVED.
Is it possible to test my application on my smartphone by running Laravel locally?
1条答案
按热度按时间xvw2m8pv1#
您可以使用NGROK或Local tunnel等工具为您的API提供外部URL,这将为您的本地API提供公共URL。
https://ngrok.com/
https://github.com/localtunnel/localtunnel