I assume you are a laravel developer. You have developed an awesome application and you want to show it to the client/ friend for testing purpose but here is the catch, application is on localhost
What could be a feasible solution to this situation?
- Get a domain name and hosting: This is could be a quiet costly solutions.
- localhost.run : This is a free service provided by localhost.run. You need not to download and install anything. Yes, tell me more about it.
Follow these steps:
Serve laravel locally i.e
php artisan serve. It will serve it on port 8000 if port 8000 is used by other application then serve it on other port, for example,
php artisan serve --port 8001
now open another terminal and write this code,
ssh -R 80:localhost:<PORT_NUMBER> ssh.localhost.run. where
<PORT_NUMBER>can be 8000 or 8001
This command will now generate two urls, one with https and one with non https.
Connect to http://<COMPUTER_NAME>.localhost.run or https://<COMPUTER_NAME>.localhost.run
In my case, it is
Now you can share this link to anybody in world and access your application as long as the process is not terminated in the terminal. Though loading speed will not be as fast as in localhost but its free, you should try it.
Thank you !