Skip to content

Instantly share code, notes, and snippets.

@ayoung
Created November 21, 2012 23:12
Show Gist options
  • Save ayoung/4128456 to your computer and use it in GitHub Desktop.
Save ayoung/4128456 to your computer and use it in GitHub Desktop.
ServiceStack init bug
[SetUpFixture]
public class SetupFixture
{
private AppHost _appHost;
private static bool _hasInitted;
[SetUp]
public void StartWebApi()
{
if (_appHost == null)
{
_appHost = new AppHost();
}
if (!_hasInitted)
{
_appHost.Init();
_hasInitted = true;
}
_appHost.Start("http://*:3005/");
}
[TearDown]
public void StopWebApi()
{
_appHost.Stop();
_appHost = null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment