Allow public accessing local rails server for testing
I list two different ways below.
rails s --binding=0.0.0.0
localtunnel npm package
For the first method, simplely run up rails server by that command, then access via ip address with port 3000 by default. If you don't have a public ip address(only LAN address), you might need to configure your Router NAT to make port 3000 alow public access. The other way is using localtunnel npm package, install by
$ npm install localtunnel -g
then after running rails server command, run
$ lt --port 3000
The localtunnel will give you an unique url like https://gqgh.localtunnel.me. Now you can accessing your local server via this url.












