Skip to content

Instantly share code, notes, and snippets.

@trustarun
Created October 25, 2017 07:23
Show Gist options
  • Save trustarun/915fa2c04fa5776d4b8e60eea5718f1c to your computer and use it in GitHub Desktop.
Save trustarun/915fa2c04fa5776d4b8e60eea5718f1c to your computer and use it in GitHub Desktop.

Revisions

  1. trustarun created this gist Oct 25, 2017.
    26 changes: 26 additions & 0 deletions localhost_public_IP
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    STEP 1 : Download ngrok
    Download from https://ngrok.com/download as per your system.
    I downloaded for 32 bit ubuntu.

    STEP 2 : unzip it in your target folder
    $ unzip /path/to/ngrok.zip

    STEP 3: move to folder where you have unziped it in step 2

    STEP 4: connect localhost as public IP with below command
    $ ./ngrok 3000 #assuming you runing your localhost server at port 3000

    It will print below:
    Session Status online
    Account arun (Plan: Free)
    Version 2.2.8
    Region United States (us)
    Web Interface http://127.0.0.1:4040
    Forwarding http://b54ed986.ngrok.io -> localhost:3000
    Forwarding https://b54ed986.ngrok.io -> localhost:3000

    Now any one on internet can access your localhost with URL https://b54ed986.ngrok.io

    NOTE:
    for more option run below command
    $ ./ngrok help