public FubuRuntime LaunchRunner() { var refresher = _container.GetInstance <IBrowserRefresher>(); refresher.StartWebSockets(); _settings.WebsocketAddress = "ws://localhost:" + refresher.Port; _topicWatcher = new TopicFileWatcher(_settings, this); _topicWatcher.StartWatching(refresher); var registry = new TopicRegistry() { RootPath = _settings.Root }; registry.AlterSettings <OwinSettings>(_ => { _.Middleware.InsertFirst(new MiddlewareNode <TopicMiddleware>()); }); registry.StructureMap(_container); return(registry.ToRuntime()); }
public FubuRuntime LaunchRunner() { var refresher = _container.GetInstance<IBrowserRefresher>(); refresher.StartWebSockets(); _settings.WebsocketAddress = "ws://localhost:" + refresher.Port; _topicWatcher = new TopicFileWatcher(_settings, this); _topicWatcher.StartWatching(refresher); var registry = new TopicRegistry() {RootPath = _settings.Root}; registry.AlterSettings<OwinSettings>(_ => { _.Middleware.InsertFirst(new MiddlewareNode<TopicMiddleware>()); }); registry.StructureMap(_container); return registry.ToRuntime(); }
public EmbeddedFubuMvcServer LaunchRunner() { var refresher = _container.GetInstance<IBrowserRefresher>(); refresher.StartWebSockets(); _settings.WebsocketAddress = "ws://localhost:" + refresher.Port; _topicWatcher = new TopicFileWatcher(_settings); _topicWatcher.StartWatching(refresher); var sampleBuilder = scanForSamples(); sampleBuilder.EnableWatching(); var registry = new TopicRegistry(_topic); return FubuApplication.For(registry).StructureMap(_container).RunEmbeddedWithAutoPort(_settings.Root); }