terça-feira, 22 de julho de 2014

Make Local Web Server Accessible Online With Localtunnel

During a growth stage, we competence muster a website in a internal server. There we can run, develop. and debug a website on a computer, locally. But when your clients need to get entrance to a website immediately, or if one of a applications we need uses a webhook that has to be online to function, we substantially wish that your internal server could be permitted online.



Making your internal server permitted online is substantially a fastest approach to cope with this, generally if we have hundreds of files that requires entrance to. This is where a apparatus called localtunnel comes in. With localtunnel we can emanate a substitute that can hovel to a internal server, creation it permitted from anywhere.


Let’s see how this apparatus works.


Installing Localtunnel


The localtunnel that we will be regulating here comes in a form of a Node.js package. So, we initial need to implement Node.js regulating a installer; we can download it in this page. Once Node.js installed, launch Terminal or Command Prompt and form this authority below.



npm implement -g localtunnel

This authority will implement localtunnel globally, so it can be accessed in any directories during any turn of your computer. Once localtunnel is installed, we should be means to entrance a lt command. To exam a command, we can form a following (in Terminal or Command Prompt).



lt –version

If a authority works, it should lapse a localtunnel chronicle commissioned in your computer, like so.



Alternately, we can also form lt –help. Like in any Help menu of an application, this sold authority will lapse a list of options and beam on regulating localtunnel.



Using Localtunnel


You can use localtunnel MAMP or WAMP; dual applications that are a many renouned for Mac and Windows to run internal server. Assuming that a URL of your internal server is http://localhost/ but a pier series that follows, we can form a authority regulating 80 as a pier number.



lt –port 80

The localtunnel will beget a randomized subdomain name, in that we can entrance your internal server anywhere, like this.



If we wish to make a subdomain easy to remember, we can supplement –subdomain parameter following a pier number. This instance next will beget hongkiat.localtunnel.me.



lt –port 80 –subdomain hongkiat

Localtunnel also support Virtual Host. By default, when we run lt –port 80 command, localtunnel will collect localhost as a residence to bond with. If we have combined a Virtual Host with a name of, for example, development.dev, we can tell localtunnel to bond to that residence instead of localhost regulating a –local-host parameter.


Put it all together, and we can type:



lt –port 80 –subdomain hongkiat –local-host hongkiat.dev

The authority above will substitute hongkiat.dev that can be accessed by hongkiat.localtunnel.me worldwide.





<!–



Suggestion:





–>




You competence like:









Advertisement





Make Local Web Server Accessible Online With Localtunnel

Nenhum comentário:

Postar um comentário