forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Self hosting
Arxisos edited this page Mar 4, 2012
·
21 revisions
It is very easy to host ServiceStack in a console app or in a windows service. You simply have to derive from AppHostHttpListenerBase instead of AppHostBase:
public class AppHost : AppHostHttpListenerBase
{
public AppHost()
: base("StarterTemplate HttpListener", typeof(HelloService).Assembly) { }
public override void Configure(Funq.Container container)
{
container.Register(new TodoRepository());
}
}
class Program
{
private static readonly string ListeningOn = "http://localhost:9200";
static void Main(string[] args)
{
//Initialize app host
var appHost = new AppHost();
appHost.Init();
appHost.Start(ListeningOn);
Console.WriteLine("Started listening on: " + ListeningOn);
Console.WriteLine("AppHost Created at {0}, listening on {1}", DateTime.Now, ListeningOn);
Console.ReadKey();
}
}- Why ServiceStack?
- What is a message based web service?
- Advantages of message based web services
- Why remote services should use separate DTOs
- Getting Started
- Reference
- Clients
- Formats
- View Engines 4. Razor & Markdown Razor
- Hosts
- Security
- Advanced
- Configuration options
- Access HTTP specific features in services
- Logging
- Serialization/deserialization
- Request/response filters
- Filter attributes
- Concurrency Model
- Built-in caching options
- Built-in profiling
- Form Hijacking Prevention
- Auto-Mapping
- HTTP Utils
- Virtual File System
- Config API
- Physical Project Structure
- Modularizing Services
- MVC Integration
- Plugins 3. Request logger 4. Swagger API
- Tests
- Other Languages
- Use Cases
- Performance
- How To
- Future