I want to transition an existing website to a SPA with REST support from WebApi 2. I don't want to have the services be part of my existing project but I would like to be able to make requests from JavaScript to my Web API layer. It would be nice if I could use api.mywebsite.com but browsers will block the cross domain request.
Instead, I am assuming I'll have to add something to hijack a specific route like: mysite.com/api/*. What is the correct way of doing this? I can't seem to find any resources that talk about doing something like this.
I am trying create something like this with a single page application. I want to call directly into the web api from my client though.