Skip to content

Awaitable Server Start() #80

Answered by scottoffen
seikosantana asked this question in Q&A
Discussion options

You must be logged in to vote

There are two alternatives to server.Start() available via extension methods on IRestServer for use with Console applications.

// This option will hold the process until the server stops
server.Run();

// This option will hold the process until the cancellation token is canceled
server.Run(CancelationToken token);

If you do use one of these options, you do not need to explicitly call server.Start().

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by seikosantana
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants