If you are a web developer, here is an interesting article for you. At some stage of the development, you might want to share / demo your web application to people outside your local network. This is a common problem in the life of a web developer. There are many ways to expose the contents on your local web server to the external world. Some of the commonly used techniques include: Port forwarding, SSH reverse tunnelling, etc. LocalTunnel is a free service that lets you share your local web server in an easy way.
LocalTunnel is a Ruby program which works on the basis of SSH reverse tunnelling. It connects to a remote host that has Gateway ports enabled. The remote host service is available for free at http://localtunnel.com. After installing LocalTunnel, localtunnel command facilitates the connection between local server and the remote host.
How to use?
- LocalTunnel can be installed using RubyGems. sudo gem install localtunnel.
- Start your local development server. It can run on any port.
- Run the localtunnel command passing the local port number. When the command is executed for the first time, you need to pass the SSH public key. More details here. localtunnel –k ~/.ssh/id_rsa.pub 8888
- If the command was successfully executed, it will show the URL to access the dev server. Note: The URL is valid only for this session. Share it with your friends. And, you are done.
LocalTunnel is hosted on github under MIT license.
-- Varun
No comments:
Post a Comment