Map a local Web service to an external network using Ngrok

Source: Internet
Author: User

Why use Ngrok?

As a web developer, we sometimes need to temporarily deploy a local Web site to an extranet for people to experience evaluation or assist in debugging, and so on, and we usually do this:

    1. Find a Web server running on an external network
    2. The server has the environment which the website needs, otherwise builds itself
    3. Deploy a Web site to a server
    4. After debugging, remove the Web site from the server

Just want to show a friend of the site, to not so troublesome, tired feeling not love ╰ ('-′) ╯

After the Ngrok, the world is so beautiful.
    1. First register and download Ngrok, get a bunch of authorization codes
    2. Run the command ngrok -authtoken 你的授权码 80 , 80 is the port of your local Web service, and then Ngrok will remember your authorization code and ngrok 80 it will be OK immediately.
    3. You'll get a list of URLs that will give you access to your local Web service.
How to use it? Step 1:download Ngrok

https://ngrok.com/

Step 2:unzip It

On Linux or OSX you can unzip Ngrok from a terminal with the following command. On Windows, just double click Ngrok.zip.

$ unzip /path/to/ngrok.zipStep 3:run It!

Read the Usage Guide for documentation on how to use Ngrok. Try it out by running it from the command line:

$ ./ngrok -helpHere is the service I started myself. 3000 port to start the local service: you can see that Ngrok will produce a forwarding http://6cdecc48.ngrok.com-127.0.0.1:3000 We visit this URL, you can see Through the external network can see our intranet services.

Ngrok official website

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.