public override void Configure(Funq.Container container) { //Set JSON web services to return idiomatic JSON camelCase properties ServiceStack.Text.JsConfig.EmitCamelCaseNames = true; ServiceStack.Text.JsConfig.DateHandler = ServiceStack.Text.JsonDateHandler.ISO8601; //Configure User Defined REST Paths //Routes // .Add<Hello>("/hello") // .Add<Hello>("/hello/{Name*}"); Routes.AddFromAssembly(typeof(CrawlerService).Assembly); //Uncomment to change the default ServiceStack configuration //SetConfig(new EndpointHostConfig { //}); Plugins.Add(new CorsFeature("*", "GET, POST, PUT, DELETE, OPTIONS", "Content-Type", false)); Plugins.Add(new ProtoBufFormat()); //Enable Authentication //ConfigureAuth(container); ////Register all your dependencies //container.Register(new TodoRepository()); }
public override void Configure(Container container) { Plugins.Add(new CorsFeature()); Routes.AddFromAssembly(typeof(WebServices).Assembly); container.Register(new TodoRepository()); }
public override void Configure(Container container) { container.Register <ICacheClient> (new MemoryCacheClient()); var appSettings = new AppSettings(); Plugins.Add(new AuthFeature(() => new WrenchAuthUserSession(), new[] { new GoogleOpenIdOAuthProvider(appSettings) })); Plugins.Add(new ValidationFeature()); container.RegisterValidators(typeof(WrenchAppHost).Assembly); Routes.AddFromAssembly(typeof(WrenchAppHost).Assembly); }
public override void Configure(Container container) { Plugins.Add(new CorsFeature()); Plugins.Add(new AuthFeature(() => new AuthUserSession(), new IAuthProvider[] { new CustomCredentialsAuthProvider(), })); Routes.AddFromAssembly(typeof(WebServices).Assembly); }
public override void Configure(Container container) { Plugins.Add(new CorsFeature()); Routes.AddFromAssembly(typeof(WebServices).Assembly); }