SlimApi

May 26, 2016 at 1:14 AM
Is SlimApi good to create a console/windows service like a mini webserver that can be consumed in mobile applications like a tablet or phone?

Regards.
Coordinator
May 26, 2016 at 4:39 AM
absolutely. The WebTests app actually has all the code that starts the self-hosted web server and it runs until unit tests complete. Just copy the 'server' code to a console app, and after starting the server make the console 'stay up' indefinitely by calling Console.ReadKey.
The actual concern is that the machine the service is running should be 'publicly visible' - open to internet and have its IP (fixed IP!) referenced as a public web address. Or you can just use the IP address of the machine - but again it should be a fixed IP address.
There are a few examples on the web about self-hosted service, but they all use 'localhost' as server address - this would not work from remote computer, obviously. So start with figuring out how you make the host computer visible to target app/device.
May 29, 2016 at 9:20 PM
Got it working.

Thanks