 
   opts = {}
   opts.type = redis
-  opts.host = url.hosename if url.hostname
+  opts.host = url.hostname if url.hostname
   opts.port = url.port  if url.port
   opts.database = url.pathname.slice(1)
   opts.namespace = "cloudsdale:faye"


# Read the environment variable
global.app_env = process.env.NODE_ENV || "development"
global.redisExpire = 86400

# Load all dependent libraries

  return client

exports.run = ->
  console.log "Booting node.js faye [#{ (process.env.FAYE_ENV || "development") }]"

  global.mongodb = connectMongoDB(process.env.MONGO_URL || "mongo://127.0.0.1:27017/cloudsdale")
  global.fayeServer = startFaye(process.env.FAYE_URL || "ws://0.0.0.0:8282/push")
