pavanarya – Pavan Kumar Aryasomayajulu

Contact Email :

Exposing my api hosted on localhost to external world through internet

with one comment

Just came across a beautiful tool
i really liked it and may be you’ll also like it.

Lets say i have a Restful service(example webapi code) in my PC , i am running it on port 4000.

So something like http://localhost:4000/getEmployeeDetails
will display my employee details.

Now i want these services to be used instantly by some mobile app or someone through internet for testing.

First of all i don’t have a domain or server to host my service and expose it over internet even for testing.

Now what i can do is i can download an exe provided by ngrok

You can simply download the zip file and unzip where ever we want in our file system.
Lets say i unzipped it in C:\Sotwares folder

And now from command prompt execute the following command.
Now follow these steps:
1. Open command promt and execute following command.
2. So lets say our api is exposed through port 4000. That is when i browse http://localhost:4000/getEmployeeDetails,
i’ll get employee details.
3. So i need to execute below commands

cd C:\Softwares
ngrok http 4000


4. Now it will provide you with an url like
So now i can give this url to someone and they can access it through internet.

So to access my Employee service hosted on my localmachine he need to simply give

This really helps us to quickly do some testing.


Written by pavanarya

September 4, 2015 at 10:32 pm

Posted in FireBug, Mobile Development, WCF, WebServices

Tagged with

One Response

Subscribe to comments with RSS.

  1. Nice article


    September 24, 2016 at 3:37 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: