I am presently developing a web service using Ruby on Rails. I wish to run it on LAN as well as web simultaneously? How can it be done?
I am assuming
OR
1) Install the proxylocal gem
gem install proxylocal
2) Run your rails server in development mode.
3) Run proxy local
$ proxylocal 3000 --host joshi_server
Local server on port 3000 is now publicly available via:
http://joshi_server.t.proxylocal.com/
Now, you can access your local server using http://joshi_server.t.proxylocal.com/ anywhere from the web.
Note
Similar services
Free : ngrok, localtunnel, pagekite, yaler,
Paid : showoff.io
I found proxylocal, localtunnel, and showoff to be similar w.r.t ease of use and reliability. I prefer proxylocal as it allows me to name and reuse the subdomain for my local server.
Do not use this approach for a production setup
Either allow the access to the server via LAN and Internet OR setup two servers that point to the same database. Rails starts multiple instances anyway, so you will not have corrupt data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With