 #
 # Dependencies:
 # 
-#    npm install commander start-stop-daemon winston sockjs
+#    npm install commander start-stop-daemon winston sockjs helenus
 #
 # ** Be sure to add dependencies to the NODE_PACKAGES list in build.py **
 #

    http = require('http')
    http_server = http.createServer((req, res) ->
        winston.info ("#{req.connection.remoteAddress} accessed #{req.url}")
        res.end("salvus node server")
    )

    ###########################

        winston.info ("new sockjs connection #{conn}")
        sockjs_connections.push(conn)
    )
    sockjs_server.installHandlers(http_server, {prefix:'/node'})

    ###########################
    # cassandra database pool
    ###########################
    cassandra = new helenus.ConnectionPool(
         hosts: program.database_nodes.split(',')
         keyspace:'salvus'
         timeout: 3000
         cqlVersion: '3.0.0'
    )
    cassandra.on('error', (err) -> winston.error(err.name, err.message))
    cassandra.connect( (err,keyspace) -> winston.error(err) if err)
                    
