Updated WireMock as a standalone process (markdown)

Stef Heyenrath
2017-06-19 08:49:02 +02:00
parent c557d82640
commit e32a23afc0

@@ -1,6 +1,37 @@
##WireMock as a standalone process
## WireMock as a standalone process
This is quite straight forward to launch a mock server within a console application.
### Option 1 : using the WireMock.Net.StandAlone library (https://www.nuget.org/packages/WireMock.Net.StandAlone/)
```c#
class Program
{
static void Main(string[] args)
{
StandAloneApp.Start(args);
Console.WriteLine("Press any key to stop the server");
Console.ReadKey();
}
}
```
### Option 2 : using the WireMock.Net.StandAlone library using the settings object
```c#
class Program
{
static void Main(string[] args)
{
var settings = new FluentMockServerSettings { }; // see source code for all the possible properties
bool allowPartialMapping = true;
StandAloneApp.Start(settings, allowPartialMapping);
Console.WriteLine("Press any key to stop the server");
Console.ReadKey();
}
}
```
### Option 3 : coding yourself
```c#
static void Main(string[] args)
{