public static IAppBuilder UseNEventStoreViewer(this IAppBuilder builder, NEventStoreViewerApiConfig config)
        {
            var configurator = new NEventStoreViewerApiConfigurator(config);
            configurator.RegisterApi(builder);

            return builder;
        }
예제 #2
0
        public void Configuration(IAppBuilder app)
        {
            app.UseCors(CorsOptions.AllowAll);
            
            var config = new NEventStoreViewerApiConfig
            {
                EnableSwagger = true,
                ConnectionString = ConfigurationManager.AppSettings["ConnectionString"]
            };

            app.Map("/viewer", map => map.UseNEventStoreViewer(config));
        }