parameters: (port=8000)
docstring: Kill the server running at the specified port.
docstring_summary: Kill the server running at the specified port.
docstring_tokens: Kill the server running at the specified port .
function: def killserver(port=8000):
      ''' Kill the server running at the specified port. '''
      import subprocess
  
      ps = subprocess.Popen('ps -ef | grep -v grep | grep \"server.js --port '+str(port) + '\"', shell=True, stdout=subprocess.PIPE)
      output = ps.stdout.read()
      ps.stdout.close()
      ps.wait()
  
      if not output:
          print '[gfx.js] sever not found on port ' + str(port)
      else:
          pid = int(output.split()[1])
          os.kill(pid, 2)
          print '[gfx.js] server stopped on port ' + str(port)
function_tokens: def killserver ( port = 8000 ) : import subprocess ps = subprocess . Popen ( 'ps -ef | grep -v grep | grep \"server.js --port ' + str ( port ) + '\"' , shell = True , stdout = subprocess . PIPE ) output = ps . stdout . read ( ) ps . stdout . close ( ) ps . wait ( ) if not output : print '[gfx.js] sever not found on port ' + str ( port ) else : pid = int ( output . split ( ) [ 1 ] ) os . kill ( pid , 2 ) print '[gfx.js] server stopped on port ' + str ( port )