init the tornado main server code