Issue
I am in the process of upgrading my laravel application. my old laravel using old version xampp. Since new laravel 10 version require higher php version, I installed another newer xampp.
Everything works for both old and new laravel for website part using chrome.
I am using react native for mobile app using API part of laravel.
When I start laravel app with php artisan serve --host 127.0.0.1 --port=8010
My react native app fetching always return network error.
The api url is http://127.0.0.1:8010/api/user
.
This only happen if I fetch from my react native app. It works when I use same api on chrome, it return json. This works fine for both laravel on Chrome. and It also works if I fetch same API to my old laravel. My old laravel using same url without the port, since both xampp version using different port.
Any idea whats wrong here?
Solution
turn out the solution is I need to map my computer and emulator port
adb -s devicename reverse tcp:8010 tcp:8010
Answered By - Tom Kur
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.