Exemplo n.º 1
0
        public void Configuration(IAppBuilder app)
        {
            // So that squishit works
            Directory.SetCurrentDirectory(AppDomain.CurrentDomain.SetupInformation.ApplicationBase);

            var configuration = new JabbrConfiguration();

            if (configuration.MigrateDatabase)
            {
                // Perform the required migrations
                DoMigrations();
            }

            var kernel = SetupNinject(configuration);

            app.Use(typeof(DetectSchemeHandler));

            if (configuration.RequireHttps)
            {
                app.Use(typeof(RequireHttpsHandler));
            }

            app.UseErrorPage();

            SetupAuth(app, kernel);
            SetupSignalR(configuration, kernel, app);
            SetupWebApi(kernel, app);
            SetupMiddleware(kernel, app);
            SetupFileUpload(kernel, app);
            SetupNancy(kernel, app);

            SetupErrorHandling();
        }
Exemplo n.º 2
0
        public void Configuration(IAppBuilder app)
        {
            var configuration = new JabbrConfiguration();

            if (configuration.MigrateDatabase)
            {
                // Perform the required migrations
                DoMigrations();
            }

            var kernel = SetupNinject(configuration);

            app.Use(typeof(DetectSchemeHandler));

            if (configuration.RequireHttps)
            {
                app.Use(typeof(RequireHttpsHandler));
            }

            app.UseErrorPage();

            SetupAuth(app, kernel);
            SetupSignalR(kernel, app);
            SetupWebApi(kernel, app);
            SetupMiddleware(kernel, app);
            SetupNancy(kernel, app);

            SetupErrorHandling();
        }