Hosting the Web API project locally
Before we can access the API layer from our mobile application, we have to set up hosting. For this example, we are going to walkthrough setup for hosting locally.
Hosting locally does not require much work, but it will require an instance of Windows and Mac OSX running together. You can achieve this by simply running parallels, or using a Windows and Mac computer.
Our first step is to open Visual Studio from our Windows instance and click the run button:
When the project starts, it will automatically open up your default web browser and show the application.
Tip
Since we don't have any visible web pages, we don't need to have the browser open. If the project is running, the web API will be running so we will be able to ping it over an HTTP request.
Now that we have the backend running, how do we access the API?
If you are running via two separate computers, we should be able to simply access the API through the IP address of the computer. In order to find out...