Commits

Michael Granger committed f7d1645

Checkpoint commit

Comments (0)

Files changed (4)

 # .rvm.gems generated gem export file. Note that any env variable settings will be missing. Append these after using a ';' field separator
-hoe-deveiate -v0.0.8
-strelka -v0.0.1.pre129
+hoe-deveiate -v '~>0.1'
+strelka -v '~>0.0' --pre
 

data/strelka-admin/apps/admin-eventserver

 require 'strelka'
 require 'strelka/websocketserver'
 
+require 'strelka/admin'
+
 
 # A websocket that sends events about the Mongrel2 server as it's running.
 class AdminEventServer < Strelka::WebSocketServer
 
+	# App ID
+	ID = Strelka::Admin::EVENTSERVER_ID
 
+	# WebSocket plugins
 	plugins :heartbeat, :pubsub, :scheduling
 
 

lib/strelka/admin.rb

 	# The ID of the Mongrel2 configuration REST service
 	CONFIGSERVICE_ID = 'config-service'
 
+	# The ID of the Mongrel2 event websocket service
+	EVENTSERVER_ID = 'admin-eventserver'
 
 	### Get the library version. If +include_buildnum+ is true, the version string will
 	### include the VCS rev ID.

lib/strelka/register.rb

 
 # Strelka application registration hook.
 
-app_config = [
-	'admin',
-	Strelka::Admin.version_string,
-	"A web interface to a Mongrel2 server."
-	{
-		
-	}
-]
+Strelka.register do |s|
+
+	s.register_app( 'strelka-admin', 'Strelka Admin Console' ) do |host|
+		route '/css',    directory( 'static/css/', 'base.css', 'text/css' )
+		route '/images', directory( 'static/images/' )
+		route '/fonts',  directory( 'static/fonts/' )
+		route '/js',     directory( 'static/js/', 'index.js', 'text/javascript' )
+
+        route '/hello', handler( 'tcp://127.0.0.1:19995', helloapp.default_appid )
+        route '/', handler( 'tcp://127.0.0.1:19999', adminapp.default_appid )
+	end
+
+end