         (.+)           # command given
     ///
     
+    params = url.parse(req.url, true).query
     
     if req.method is 'GET'
         
-        params = url.parse(req.url, true).query
-        
-        if params?.reload == '1' && params.key == config.key
+        if params?.reload == '1' and params.key == config.key
             console.log "** RELOADING **"
             res.end "** RELOADING **"
             reloadServer()
             return
         
-        if params?.restart == '1' && params.key == config.key
+        if params?.restart == '1' and params.key == config.key
             console.log "** RESTARTING **"
             res.end "** RESTARTING **"
             reloadServer()

    
        req.on 'end', ->
        
            query = qs.parse(body)?.body
            if query and matches = query.match(pattern)
            

            
#####

reloadServer = (cb = ->, msg) ->
    exec 'git pull', (err, stdout, stderr) ->
        if err
            console.log "git pull failed"
            cb "Failed to update :/"
        else
            console.log stdout
            if msg
                cb msg
            else
                cb stdout + "\n Restarting..."
            restartServer cb
        
restartServer = (cb) ->
